Safety-enhanced automobile part switch test platform and method
The safety-enhanced automobile component switch test platform addresses inefficiencies and data security issues by employing a blockchain and IPFS network for secure, real-time data transmission and decentralized storage, ensuring accurate and tamper-proof test results.
Patent Information
- Application Number
- CN202311774178.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2025-01-03
AI Technical Summary
Traditional automobile component switch testing methods suffer from low efficiency, high labor costs, and risks of data tampering and misjudgment due to manual result evaluation and insecure data transmission, leading to inaccurate reports.
A safety-enhanced automobile component switch test platform utilizing a blockchain network and IPFS network for secure data transmission and storage, combined with CAN bus communication, ensures tamper-proof and traceable test results through real-time key message detection and decentralized storage.
The platform provides secure, efficient, and accurate switch testing by ensuring data integrity and traceability, reducing the risk of tampering and enhancing data management security through blockchain and IPFS technologies.
Smart Images

Figure CN119254451A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an automobile component switch test platform and method based on a CAN bus, belonging to the field of automobile component switch test. Background Art
[0002] With the continuous expansion of automobile functions and the improvement of the level of intelligence, the types and quantities of various functional switches are increasing, such as the multi-function control switch on the steering wheel, the door and window switches, etc. In order to ensure that these component switches can work stably and reliably in long-term use, it is necessary to develop a component switch test bench. Traditional switch function tests use tools such as oscilloscopes and multimeters for testing. The disadvantage of this is that testers need to manually judge the test results, which has the disadvantages of low test efficiency, high missed and false tests, and high labor costs. In addition, there is a risk of data being tampered with during the transmission from the lower computer to the upper computer, resulting in inaccurate results received by the upper computer, causing misjudgment. Traditional data management uses database services. The disadvantage is that users can directly modify the data in the database, so that the generated report data is incorrect, affecting the traceability of switch test data. Summary of the invention
[0003] In order to solve the problems existing in the prior art, the present invention provides a security-enhanced automobile component switch test platform and method for enhancing the security of switch test data.
[0004] In order to achieve the above-mentioned purpose, the technical solution proposed by the present invention is: a safety-enhanced automobile component switch test platform, characterized in that: it includes a test bench upper computer, a test bench lower computer, a blockchain network and an IPFS network; The switch to be tested is connected to the lower computer of the test bench, the lower computer of the test bench is connected to the upper computer of the test bench for communication, the lower computer of the test bench and the upper computer of the test bench are connected to the blockchain network respectively, and the upper computer of the test bench is connected to the IPFS network; The test bench upper computer burns the switch test program into the switch to be tested through the test bench lower computer; The switch to be tested sends a key message to the test bench lower computer in real time through the switch test program. The test bench lower computer gives a test result according to the key message and transmits the test result to the test bench upper computer and the blockchain network. The upper computer of the test bench receives the test results sent by the lower computer of the test bench, and queries the test results from the blockchain network. If there is no objection between the two, the test results are uploaded to the IPFS network for storage.
[0005] A further design of the above technical solution is as follows: the switch to be tested is connected to the lower computer of the test bench via a CAN bus harness, and the CAN bus harness includes a power line; the device to be tested is powered by the lower computer of the test bench via the CAN bus harness.
[0006] The test bench lower computer is connected to the test bench upper computer via WIFI communication.
[0007] The test bench lower computer transmits the test results to the test bench upper computer through the MQTT protocol.
[0008] The test bench host computer is provided with a visualization module, which is used to receive MQTT information sent by the test bench lower computer, and use Vue technology to complete data processing and real-time display.
[0009] The test bench lower computer and the test bench upper computer are both provided with an identity authentication module, and the identity authentication module is used for performing identity authentication when the test bench lower computer and the test bench upper computer communicate with each other.
[0010] The blockchain network adopts the Hyperledger Fabric blockchain platform.
[0011] The blockchain network includes an identity authentication module, which is used to perform identity authentication when the blockchain network communicates with the test bench lower computer and the test bench upper computer.
[0012] After receiving the test result file, the IPFS network generates a unique file hash identifier, and the test platform host computer saves the file hash identifier in the blockchain network and corresponds to the test switch.
[0013] A safety-enhanced automobile component switch test method is applied to the above-mentioned safety-enhanced automobile component switch test platform, and the test method comprises the following steps: Step S1: The tester clicks the power-on button of the test bench upper computer, sends a power-on instruction to the test bench lower computer, and enables the test bench lower computer to supply power to the switch to be tested; Step S2: After receiving the power-on command, the lower computer of the test bench powers on the test switch; Step S3: The test bench host computer sends a request to control the test bench host computer to call the JLink.exe program to transfer the burned Hex file to the switch to be tested; Step S4: The switch to be tested sends a key message to the lower computer of the test bench in real time through the switch test program. The lower computer of the test bench checks the key function according to the message and gives the test result; Step S5: When the test bench lower computer and the test bench upper computer exchange information, the identity of the other party must be ensured. After the identity authentication is successful, the test bench lower computer sends the key detection result to the upper computer through the MQTT protocol; Step S6: When all the switch button tests are completed, the test bench lower computer provides the identity certificate file to call the data upload contract to upload the switch test results to the blockchain network. The test bench upper computer needs to provide the identity certificate to obtain the switch test results, and compare the results queried from the blockchain network with the results received from the test bench lower computer to verify whether the data has been tampered with; Step S7: If there is no objection to the test result of the test device, the tester clicks the Generate Report button, and the system will store the generated report file in the IPFS network by calling the IPFS file upload service, and IPFS will return a unique file hash identifier; Step S8: When the report is successfully generated, the host computer of the test platform needs to provide the identity certificate to update the hash identifier of the report file to the blockchain network and correspond to the test equipment; Step S9: After the switch to be tested is tested, the test switch is powered off and the test bench host computer page is cleared to enter the next switch test.
[0014] Compared with the prior art, the present invention has the following advantages: The test platform for testing the switch of CAN bus automobile parts of the present invention combines blockchain technology, IPFS file system, Internet of Things technology and CAN bus, reads the state of the switch button to be tested in real time through the switch test program, and ensures that the test data cannot be tampered with and can be traced through the blockchain, so that the host computer can verify the received results. Through the IPFS system, the storage performance of the blockchain network is expanded. The key message is detected by the lower computer and the test results are saved in the blockchain. The key test results are displayed in real time by the upper computer and the data is obtained from the chain for verification and report generation. Compared with the traditional switch test solution, this solution combines blockchain and IPFS technology, realizes decentralized storage of data, cannot be tampered with and can be verified, and protects the security of data before transmission. Through the blockchain identity authentication module, access control module and smart contract service, the upper and lower computers on the test platform can better interact with the blockchain. Through the upper and lower computer identity authentication modules, the security of data during transmission is protected.
[0015] The present invention builds a decentralized and security-enhanced test platform. The identity authentication mechanism, access control mechanism and transaction endorsement mechanism of the blockchain network are combined to ensure the security of the test data. In view of the problem that the storage space of the blockchain network nodes is limited and the upload and download require consensus, resulting in slow file transfer rates, the IPFS off-chain network is used to save files and improve the file transfer rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A business flow chart in an embodiment of the present invention; Figure 2A diagram of the system architecture in an embodiment of the present invention; Figure 3 This is a hardware module diagram of the lower computer of the test bench in an embodiment of the present invention; Figure 4 Flow chart of the switch test procedure in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. Embodiment 1
[0018] like Figure 1 As shown, this embodiment provides a security-enhanced automotive component switch testing platform, including a blockchain network, an IPFS network, a test bench lower computer and a test upper computer.
[0019] The blockchain network uses Hyperledger Fabric 2.3.2, including identity authentication module, access control module, endorsement module and smart contract service. Three sorting nodes, four endorsement nodes and one Fabric CA node are deployed respectively. All nodes are deployed in one channel. The blockchain consensus mechanism uses raft consensus. The sorting node is used to package transactions to generate blocks, the endorsement node is used to endorse transactions, and the Fabric CA node is used to issue identity certificates to client nodes such as the test bench host computer and the test bench lower computer.
[0020] In the identity authentication module, the client node registers the entity identity in the blockchain network through the Fabric CA node. After successful registration, the CA node will issue an identity certificate. When the client node submits a transaction, it needs to provide an identity certificate file first to verify the legitimacy of the identity. At the same time, the client node needs to use the identity certificate to digitally sign each submitted transaction to ensure the integrity and non-repudiation of the transaction.
[0021] In the endorsement module, the endorsement node is used to endorse the transaction submitted by the client node and return the endorsement result to the client node. The endorsement strategy only requires the consent of more than half of the nodes. If more than 1 / 2 of the nodes agree to write it into the ledger, it means that the transaction endorsement is successful. Then the client node submits the transaction information to the sorting node, which packs it into the block and saves it to the blockchain network.
[0022] The access control module is used to manage and control the access rights of participants to resources in the blockchain network. In combination with the smart contract service, we write data upload contracts, data query contracts and data update contracts. The data upload contract can only be called by the test bench lower computer to upload the test results of the test equipment; the data query contract can only be called by the test bench upper computer to verify whether the received results have been tampered with; the data update contract is used to update the report file hash index of the test equipment, because when the lower computer uploads the test results, it does not upload the report file address. The report file is only updated to the corresponding record by the upper computer after it is generated by the upper computer.
[0023] The IPFS network is used to make up for the lack of Fabric network nodes. The storage space of Fabric network nodes is limited, and the upload and download of files require consensus, resulting in a very slow file transfer rate. IPFS is a distributed file system that uses a peer-to-peer network protocol. It can permanently decentralize the storage of files, save only one copy of a file, and generate a unique hash identifier to achieve uniqueness and save space. The hash identifier generated by each file will be called by the test bench host computer to update the data contract and saved in the corresponding test results.
[0024] The test platform software modules include visualization module, identity authentication module, data management module, power module, programming module, communication module, test module, etc. The visualization module is used to receive the MQTT information sent by the test bench lower computer in real time, and use Vue technology to complete data processing and display in real time; The identity authentication module is used to ensure system security and prevent unauthorized access and operation. When the test bench lower computer and the upper computer communicate, a key exchange protocol is used for identity authentication. The upper computer and the lower computer each generate a pair of keys including a public key and a private key. When the communication is established, the public key is sent to the other party and the private key is retained. When exchanging data, it is signed with the other party's public key and then sent to the other party.
[0025] The data management module is used to manage test data. When a switch test is completed, the lower computer will save the overall test results of the test equipment to the blockchain network by calling the data upload contract. The upper computer will call the data query contract to verify whether the received test results have been tampered with based on the data in the blockchain. If it has not been tampered with, the permission to generate reports is open. When the user clicks the Generate Report button, a PDF file will be generated. The file template is drawn by Jaspersoft. After the file is generated, the upper computer will upload the report to the IPFS network, and update the generated unique hash identifier to the corresponding test record by calling the update contract; The power module is used to control the switch state of the device under test, and the host computer of the test platform sets a power-on button for sending an HTTP power-on request; The burning module is used to burn the switch test program into the device under test. The upper computer of the test bench specifies a burning button for calling the JLink.exe program. JLink.exe burns the switch test program into the device under test through the lower computer of the test bench. The communication module is used to complete the communication between the test bench lower computer, the test bench upper computer and the device under test. The test bench lower computer communicates with the test bench upper computer using WIFI, and the test bench upper computer and the device under test are connected using a CAN bus harness; The test module is used to collect key messages on the CAN bus in real time, and compare the key messages with the expected messages according to a specified key sequence. If they are consistent, the test is successful, otherwise the test fails. After the judgment is completed, the test results are sent to the host computer in JSON data format through the MQTT communication protocol; like Figure 2 As shown, for a safety-enhanced automotive component switch test platform hardware module, the lower computer includes a chip, a power module, a flash memory module, a USB module, a WIFI module, an output module, a CAN / LIN bus module, and a JLink module; the upper computer can use only a computer.
[0026] The power module is used to supply power to the lower computer of the test bench through an external power line. The external power line converts the 220V voltage into a 36V input power supply for the lower computer of the test bench to work. The lower computer of the test bench is protected from high voltage through a 500mA current limiting resistor, a unidirectional conducting diode SS34 and a voltage regulator diode SZSMA33CAT3G. The 36V voltage is processed by the circuit, and the output voltages of LX1, LX2 and LX3 are 1.2V, 1.8V, 3.3V and 5V respectively, which are used for the work of other modules. The chip used is NUC977DK62Y, which is used to support the work of embedded systems and related services. The working voltage of the chip is 3.3V; The flash memory module is used to store embedded systems and some application services such as test services, MQTT services, etc. The flash memory chip uses w29N01, and the operating voltage is 3.3V; The USB module is used for external device debugging test bench lower computer, the hardware adopts NUP2202, and the working voltage is 3.3V; The WIFI module is used for wireless communication, the WIFI chip uses ESP8266, and the operating voltage is 3.3V; the output module and the CAN / LIN bus module use the CAN bus harness to connect the device under test, respectively completing the functions of power supply and communication, the CAN bus uses the TJA051T high-speed CAN transceiver, the operating voltage is 5V, the CAN-TX pin is used to send messages, and the CAN-RX pin is used to receive messages; The JLink module replaces the JLink writer, has an operating voltage of 3.3V, uses a USB interface and hardware STM32F0 to work together to complete the burning, and the USB interface is used to connect to the host computer, and the host computer burns the Hex file into the switch to be tested through the JLink.exe program.
[0027] In this embodiment, the device to be tested is connected to the test bench lower computer through the CAN bus wiring harness, and the test bench lower computer communicates with the test bench upper computer through the WIFI; the test bench lower computer is powered by the lower computer power supply, and the test bench upper computer is powered by the upper computer power supply; the blockchain network is used to save the test results of automobile parts switches.
[0028] The CAN bus harness includes a power line; the device under test is powered by the test bench lower computer through the CAN bus harness. After the device under test is powered on, the switch test program is burned into the device under test through the test bench upper computer and the test bench lower computer; the specific logic of the switch test program is as follows Figure 4 As shown, press the buttons in the specified order. When the test program detects the switch electrical signal, it will convert the electrical signal into a corresponding message and transmit it to the CAN bus. The switch test program detects the key status of the device under test in real time, and converts the key electrical signal of the device under test into a corresponding message and transmits it to the CAN bus harness. The test bench lower computer collects messages from the CAN bus harness and judges the messages. If the message is correct, the test passes, and if it is incorrect, the test fails. Finally, the test results are transmitted to the test bench upper computer through the MQTT protocol. After all the key tests of the automotive parts switch are completed, the test bench lower computer will call the data upload smart contract to save the switch test results to the blockchain network.
[0029] The test bench host computer acquires the MQTT message sent by the test bench slave computer in real time, and displays the test result of each button of the device under test in real time.
[0030] The upper computer of the test bench receives the test results sent by the lower computer of the test bench. After all the switch button tests are completed, the received switch test results will be compared with the switch test results in the blockchain network to verify whether the data has been tampered with. If the data has been tampered with, a warning will be given and retesting will be required.
[0031] After the test is completed, the host computer of the test platform will provide a report generation button. Clicking the button will retrieve the test results from the blockchain network, and generate a PDF file after rendering the report file. While generating the PDF file, the system will call the IPFS file upload service, save the PDF file to the decentralized IPFS network, and generate a unique file hash identifier. The system will save the file hash identifier to the blockchain network and correspond it to the test equipment. When tracing the problem, the user can quickly locate the report file based on this hash identifier. Embodiment 2
[0032] like Figure 3 As shown, the present embodiment provides a safety-enhanced automobile component switch testing method, comprising the following steps: Step S1: For the power module of the host computer on the test bench, the tester clicks the power-on button of the host computer to send a power-on instruction to the slave computer to power the device under test.
[0033] Step S2: For the power supply module of the lower computer of the test bench, after receiving the power-on instruction, the lower computer powers on the test switch.
[0034] Step S3: For the test bench host computer programming module, the host computer sends a request to call the JLink.exe program to burn the Hex file into the switch to be tested.
[0035] Step S4: For the test bench lower computer programming module, the lower computer replaces the JLink programmer and transfers the hex file into the test switch.
[0036] Step S5: For the test module of the lower computer of the test bench, the test switch sends a key message to the lower computer of the test bench in real time through the switch test program. The lower computer checks the key function according to the message and gives the test result.
[0037] Step S6: For the identity authentication module and the communication module, the lower computer and the upper computer need to ensure the identity of each other when exchanging information. After the identity authentication is successful, the lower computer sends the key detection result to the upper computer through the MQTT protocol.
[0038] Step S7: For the data management module, blockchain identity authentication module, access control module and smart contract service, when all switch buttons are tested, the lower computer needs to provide an identity certificate file to call the data upload contract to upload the switch test results to the chain. The upper computer needs to provide an identity certificate to call the data query contract to obtain the switch test results, and compare the results queried from the chain with the received results to verify whether the data has been tampered with. If the data has been tampered with, a warning will be given and retesting will be required.
[0039] Step S8: For the host computer report module and IPFS service, if there is no objection to the test results of the test equipment, the tester clicks the Generate Report button, and the system will store the generated report file in the IPFS network by calling the IPFS file upload service. At the same time, IPFS will return a unique file hash identifier.
[0040] Step S9: For the host computer data management module, blockchain identity authentication module, access control module and smart contract service, when the report is successfully generated, the host computer needs to provide an identity certificate to call the update contract to update the report file hash identifier to the blockchain network and correspond to the test device.
[0041] Step S10: After the equipment test is completed, the test equipment is powered off and the host computer page is cleared to enter the next switch test.
[0042] The above are only preferred embodiments of the present invention, but do not limit the patent scope of the present invention. Although the present invention is described in detail with reference to the above embodiments, those skilled in the art can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features with equivalent ones. Any equivalent structure made by using the contents of the present invention specification and drawings, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.
Claims
1. A safety-enhanced automotive component switch test platform, characterized in that: Including the test bench host computer, test bench slave computer, blockchain network and IPFS network; The switch to be tested is connected to the lower computer of the test bench, the lower computer of the test bench is connected to the upper computer of the test bench for communication, the lower computer of the test bench and the upper computer of the test bench are connected to the blockchain network respectively, and the upper computer of the test bench is connected to the IPFS network; The test bench upper computer burns the switch test program into the switch to be tested through the test bench lower computer; The switch to be tested sends a key message to the test bench lower computer in real time through the switch test program. The test bench lower computer gives a test result according to the key message and transmits the test result to the test bench upper computer and the blockchain network. The upper computer of the test bench receives the test results sent by the lower computer of the test bench, and queries the test results from the blockchain network. If there is no objection between the two, the test results are uploaded to the IPFS network for storage.
2. The safety-enhanced automotive component switch test platform according to claim 1, characterized in that: The switch to be tested is connected to the lower computer of the test bench through a CAN bus harness, and the CAN bus harness includes a power line; the device to be tested is powered by the lower computer of the test bench through the CAN bus harness.
3. The safety-enhanced automotive component switch test platform according to claim 1, characterized in that: The test bench lower computer is connected to the test bench upper computer via WIFI communication.
4. The safety-enhanced automotive component switch test platform according to claim 1, characterized in that: The test bench lower computer transmits the test results to the test bench upper computer through the MQTT protocol.
5. The safety-enhanced automotive component switch test platform according to claim 4, characterized in that: The test bench host computer is provided with a visualization module, which is used to receive MQTT information sent by the test bench lower computer, and use Vue technology to complete data processing and real-time display.
6. The safety-enhanced automotive component switch test platform according to claim 5, characterized in that: The test bench lower computer and the test bench upper computer are both provided with an identity authentication module, and the identity authentication module is used for performing identity authentication when the test bench lower computer and the test bench upper computer communicate with each other.
7. The safety-enhanced automotive component switch test platform according to claim 6, characterized in that: The blockchain network adopts the Hyperledger Fabric blockchain platform.
8. The safety-enhanced automotive component switch test platform according to claim 7, characterized in that: The blockchain network includes an identity authentication module, which is used to perform identity authentication when the blockchain network communicates with the test bench lower computer and the test bench upper computer.
9. The safety-enhanced automobile component switch test platform according to claim 8, characterized in that: After receiving the test result file, the IPFS network generates a unique file hash identifier, and the test bench host computer saves the file hash identifier in the blockchain network and corresponds to the test switch.
10. A safety-enhanced automotive component switch testing method, characterized in that: The safety-enhanced automotive component switch test platform according to any one of claims 1 to 9 is applied, wherein the test method comprises the following steps: Step S1: The tester clicks the power-on button of the test bench upper computer, sends a power-on instruction to the test bench lower computer, and enables the test bench lower computer to supply power to the switch to be tested; Step S2: After receiving the power-on instruction, the lower computer of the test bench powers on the test switch; Step S3: The test bench host computer sends a request to control the test bench host computer to call the JLink.exe program to transfer the burned Hex file to the switch to be tested; Step S4: The switch to be tested sends a key message to the lower computer of the test bench in real time through the switch test program. The lower computer of the test bench checks the key function according to the message and gives the test result; Step S5: When the test bench lower computer and the test bench upper computer exchange information, the identity of the other party must be ensured. After the identity authentication is successful, the test bench lower computer sends the key detection result to the upper computer through the MQTT protocol; Step S6: When all the switch button tests are completed, the test bench lower computer provides the identity certificate file to call the data upload contract to upload the switch test results to the blockchain network. The test bench upper computer needs to provide the identity certificate to obtain the switch test results, and compare the results queried from the blockchain network with the results received from the test bench lower computer to verify whether the data has been tampered with; Step S7: If there is no objection to the test result of the test device, the tester clicks the Generate Report button, and the system will store the generated report file in the IPFS network by calling the IPFS file upload service, and IPFS will return a unique file hash identifier; Step S8: When the report is successfully generated, the host computer of the test platform needs to provide the identity certificate to update the hash identifier of the report file to the blockchain network and correspond to the test equipment; Step S9: After the switch to be tested is tested, the test switch is powered off and the test bench host computer page is cleared to enter the next switch test.
