Testing method and device based on multi-core ECU, controller, medium and vehicle
Through the testing method for multi-core ECUs, inter-core testing and status updates are carried out, which solves the problem that the prior art cannot be applied to communication testing of multi-core ECUs, and improves the test accuracy and network communication stability.
Patent Information
- Application Number
- CN202411248840.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-06
AI Technical Summary
The existing testing methods cannot be applied to communication testing of multi-core ECUs, resulting in unstable network communication of the test domain controller and reduced test accuracy.
A test method based on multi-core ECU is proposed. By responding to the test connection request of the target control unit, the address configuration data of the core unit is obtained, the inter-core test is performed, and the test status is updated. If all core unit test statuses are tested, then Determine the test results of the target control unit.
The test accuracy of multi-core ECU is improved, thereby improving the stability of network communication of test domain controllers.
Smart Images

Figure CN119094391A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle communication technology, and in particular to a testing method and device, a controller, a medium, and a vehicle based on a multi-core ECU. Background Art
[0002] A multi-core electronic control unit (ECU), also known as a multi-core ECU or a multi-core controller, refers to an electronic control unit that integrates multiple processing cores in a single electronic device. A multi-core ECU allows the ECU to perform multiple tasks on multiple cores simultaneously, thereby improving data processing speed and response time, and multi-core ECUs are also widely used in vehicle network communication scenarios. However, the test method for a single ECU in the related art cannot be applied to the communication test of a multi-core ECU, that is, it cannot be applied to the communication address resolution protocol (ARP) test requirements of a multi-core ECU, thereby affecting the network communication and stability of the test domain controller, and reducing the test accuracy of the multi-core ECU. Therefore, how to propose a test method that can better realize the test requirements of a multi-core ECU, improve the test accuracy of a multi-core ECU, and thus improve the network communication and stability of the test domain controller has become a technical problem that needs to be solved urgently. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a testing method and device, controller, medium, and vehicle based on a multi-core ECU, aiming to improve the testing accuracy of the multi-core ECU, thereby improving the network communication and stability of the test domain controller.
[0004] To achieve the above objectives, a first aspect of an embodiment of the present application proposes a testing method based on a multi-core ECU, comprising:
[0005] In response to a test connection request for a first core unit in a target control unit, first address configuration data of the first core unit and second address configuration data of a second core unit in the target control unit are acquired based on a preset address configuration table; wherein the target control unit includes a plurality of core units, the first core unit is used to indicate a core unit currently being tested in the target control unit, and the second core unit is used to indicate a core unit currently not being tested in the target control unit;
[0006] Performing an inter-core test on the first core unit based on the first address configuration data and the second address configuration data to obtain an inter-core test result; wherein the inter-core test result is used to indicate an inter-core test between the first core unit and a plurality of the second core units;
[0007] The test state of the first core unit is updated to a tested state, and the first core unit and the second core unit are updated based on the plurality of the core units, and the test state corresponding to the updated first core unit is an untested state;
[0008] If the test status of the plurality of core units included in the target control unit are all in the tested status, the target test result of the target control unit is determined based on the inter-core test results corresponding to the plurality of core units.
[0009] In some embodiments, performing an inter-core test on the first core unit based on the first address configuration data and the second address configuration data to obtain an inter-core test result includes:
[0010] Generate an inter-core test message corresponding to the second core unit based on the first address configuration data and the second address configuration data;
[0011] The corresponding inter-core test messages are sent to the plurality of the second core units, and the inter-core test result of the first core unit is determined based on the response results of the plurality of the inter-core test messages.
[0012] In some embodiments, determining the inter-core test result of the first core unit based on the response results of the plurality of inter-core test messages includes:
[0013] Performing data detection on the response result of the inter-core test message based on the preset address configuration table to obtain a test sub-result; wherein the test sub-result is used to indicate the inter-core test between the first core unit and one of the second core units;
[0014] The corresponding inter-core test result is determined based on the multiple test sub-results corresponding to the first core unit.
[0015] In some embodiments, performing data detection on the response result of the inter-core test message based on the preset address configuration table to obtain a test sub-result includes:
[0016] If a response reply signal corresponding to the inter-core test message is not received within a preset time interval, it is determined that the test sub-result is a communication connection abnormality; or,
[0017] If a response reply signal corresponding to the inter-core test message is received within a preset time interval, the response reply signal is parsed to obtain parsed data; and the parsed data is verified based on the preset address configuration table to obtain the test sub-result.
[0018] In some embodiments, the parsed data includes a parsed response type, a response signal address data, and a response checksum data, and performing data verification on the parsed data based on the preset address configuration table to obtain the test sub-result includes:
[0019] Acquire the corresponding target response type and target checksum data of the second core unit from the preset address configuration table;
[0020] Perform type matching based on the target response type and the parsed response type to obtain a type matching result;
[0021] Performing address matching based on the response signal address data and the second address configuration data to obtain an address matching result;
[0022] Performing checksum matching based on the response checksum data and the target checksum data to obtain a checksum matching result;
[0023] The test sub-result is determined based on the type matching result, the address matching result and the checksum matching result.
[0024] In some embodiments, before responding to the test connection request to the first core unit in the target control unit, the method further includes:
[0025] Performing a unit type test on the target control unit to obtain a unit state; wherein the unit state includes a pending test state, and the pending test state is used to indicate that a multi-core test is performed on the target control unit;
[0026] If the unit state is the waiting-for-test state, a test connection request for the first core unit in the target control unit is received.
[0027] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application proposes a test device based on a multi-core ECU, the device comprising:
[0028] an acquisition module, configured to respond to a test connection request for a first core unit in a target control unit, and acquire first address configuration data of the first core unit and second address configuration data of a second core unit in the target control unit based on a preset address configuration table; wherein the target control unit includes a plurality of core units, the first core unit is used to indicate a core unit currently being tested in the target control unit, and the second core unit is used to indicate a core unit currently not being tested in the target control unit;
[0029] A testing module, configured to perform an inter-core test on the first core unit based on the first address configuration data and the second address configuration data, and obtain an inter-core test result; wherein the inter-core test result is used to indicate the inter-core test on the first core unit;
[0030] An updating module, configured to update the test status of the first core unit to a tested status, and update the first core unit and the second core unit based on a plurality of the core units, wherein the test status corresponding to the updated first core unit is an untested status;
[0031] A determination module is used to determine a target test result of the target control unit based on the inter-core test results corresponding to the multiple core units if the test states of the multiple core units included in the target control unit are all in the tested state.
[0032] To achieve the above-mentioned objectives, the third aspect of an embodiment of the present application proposes a controller, comprising: at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements the method described in the first aspect above.
[0033] To achieve the above objectives, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0034] The present application proposes a test method and device based on a multi-core ECU, a controller, a medium, and a vehicle, which respond to a test connection request for a first core unit in a target control unit and obtain first address configuration data of the first core unit and second address configuration data of a second core unit in the target control unit based on a preset address configuration table, wherein the first core unit is used to indicate a core unit currently being tested in the target control unit, and the second core unit is used to indicate a core unit currently not being tested in the target control unit; further, based on the first address configuration data and the second address configuration data, an inter-core test is performed on the first core unit to obtain an inter-core test result, and the inter-core test result is used to indicate an inter-core test between the first core unit and multiple second core units; further, the test status of the first core unit is updated to a tested status, and the first core unit and the second core unit are updated based on multiple core units, and the test status corresponding to the updated first core unit is an untested status; if the test status of multiple core units included in the target control unit are all in a tested status, the target test result of the target control unit is determined based on the inter-core test results corresponding to the multiple core units. The embodiment of the present application controls the connection of each core unit in the target control unit, thereby performing inter-core testing between the controlled core unit and other core units, and determining the target test result of the target control unit based on the inter-core test results corresponding to the multiple core units. Therefore, the present application can improve the test accuracy of the multi-core ECU, thereby improving the network communication and stability of the test domain controller. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 This is the first flow chart of the multi-core ECU testing method provided in the embodiment of the present application;
[0036] Figure 2 is a second flow chart of a multi-core ECU-based testing method provided in an embodiment of the present application;
[0037] Figure 3 yes Figure 1 A flowchart of step S120 in FIG.
[0038] Figure 4 yes Figure 2 A flowchart of step S220 in FIG.
[0039] Figure 5 is a flow chart for determining a test sub-result provided in an embodiment of the present application;
[0040] Figure 6 It is a structural diagram of realizing automatic testing of a multi-core ECU provided in an embodiment of the present application;
[0041] Figure 7It is a specific flow chart of a multi-core ECU testing method provided in an embodiment of the present application;
[0042] Figure 8 It is a structural schematic diagram of a multi-core ECU-based test device provided in an embodiment of the present application;
[0043] Fig. 9 It is a hardware structure diagram of the controller provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0045] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0046] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0047] First, some nouns involved in this application are analyzed:
[0048] Address Resolution Protocol (ARP): ARP is a protocol used to resolve network layer addresses (such as Internet Protocol addresses (IP addresses)) into data link layer addresses (such as Media Access Control Addresses (MAC addresses)). ARP is an important protocol in the TCP / IP protocol suite, responsible for finding the correct physical address when transferring data packets from the network layer to the data link layer when communicating between devices in the network.
[0049] Internet Control Message Protocol (ICMP): It is a sub-protocol of the TCP / IP protocol suite, used to transmit control messages between IP hosts and routers. Control messages refer to network messages such as whether the network is connected, whether the host is reachable, and whether the route is available.
[0050] With the increasing complexity of vehicle network communication, vehicle Ethernet domain controllers are widely used. Single-core Ethernet controllers can no longer meet the application and performance requirements of vehicle domain control networks. Multi-core controllers are increasingly used, and communication test scenarios have gradually evolved from traditional inter-controller communication tests to various forms of inter-controller communication + multi-core communication tests. Multi-core Electronic Control Unit (ECU), also known as multi-core ECU or multi-core controller, refers to an electronic control unit that integrates multiple processing cores in a single electronic device. In electric vehicles, ECU is one of the core components, responsible for controlling the start, run, acceleration, stop and other working states of electric vehicles. It can receive data from various sensors, perform calculations, and issue instructions to control the corresponding actuators to achieve comprehensive control and management of electric vehicles. Each processing core of a multi-core ECU is an independent processing unit that can work together to perform complex calculations and control tasks. In a multi-core ECU, each core can run independently to improve processing capabilities and the overall performance of the system. Multi-core ECU allows ECU to execute multiple tasks on multiple cores simultaneously, thereby improving data processing speed and response time. Multi-core ECU is also widely used in vehicle network communication scenarios. Therefore, how to ensure the static ARP test requirements for inter-core communication of multi-core controllers is an important part of testing the network communication and stability of domain controllers.
[0051] However, the related art test method for a single ECU cannot be applied to the communication test of a multi-core ECU, that is, it cannot be applied to the communication address resolution protocol (ARP) test requirements of a multi-core ECU, thereby affecting the network communication and stability of the test domain controller, and reducing the test accuracy of the multi-core ECU. Therefore, how to propose a test method that can better meet the test requirements of a multi-core ECU, improve the test accuracy of a multi-core ECU, and thus improve the network communication and stability of the test domain controller has become a technical problem that needs to be solved urgently.
[0052] Based on this, the embodiments of the present application provide a testing method and device, controller, medium, and vehicle based on a multi-core ECU, aiming to improve the testing accuracy of the multi-core ECU, thereby improving the network communication and stability of the test domain controller.
[0053] The test method based on multi-core ECU provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal (i.e., the client) or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content De l ivery Network, CDN) and big data and artificial intelligence platforms; the software can be an application that implements the test method based on multi-core ECU, etc., but is not limited to the above forms. Therefore, if the test method based on multi-core ECU provided in the embodiment of the present application is applied to the server side, the server side can be connected to at least one vehicle-mounted terminal for communication.
[0054] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network personal computers (PC), minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0055] In some embodiments, see Figure 1 , Figure 1 This is an optional flow chart of a multi-core ECU testing method provided in an embodiment of the present application. The method can be applied to testing a target control unit, and specifically may include but is not limited to steps S110 to S140.
[0056] Step S110, in response to a test connection request for a first core unit in a target control unit, and based on a preset address configuration table, acquiring first address configuration data of the first core unit and second address configuration data of a second core unit in the target control unit;
[0057] Step S120, performing an inter-core test on the first core unit based on the first address configuration data and the second address configuration data to obtain an inter-core test result;
[0058] Step S130, updating the test status of the first core unit to a tested status, and updating the first core unit and the second core unit based on the multiple core units, and the test status corresponding to the updated first core unit is an untested status;
[0059] Step S140 : if the test status of the multiple core units included in the target control unit are all in the tested status, determine the target test result of the target control unit based on the inter-core test results corresponding to the multiple core units.
[0060] In the steps S110 to S140 shown in the embodiment of the present application, each core unit in the target control unit is connected and controlled, thereby performing inter-core testing between the controlled core unit and other core units, and determining the target test result of the target control unit based on the inter-core test results corresponding to the multiple core units. Therefore, the present application can improve the test accuracy of the multi-core ECU, thereby improving the network communication and stability of the test domain controller.
[0061] In step S110 of some embodiments, the target control unit is a multi-core ECU, and the present application can implement the vehicle Ethernet multi-core controller test by testing the target control unit. The target control unit includes multiple core units, the first core unit is used to indicate the core unit currently being tested in the target control unit, and the second core unit is used to indicate the core unit currently not being tested in the target control unit. Since the target control unit includes multiple core units, the second core unit is any core unit in the target control unit except the first core unit. Further, the first address configuration data of the first core unit and the second address configuration data of the second core unit in the target control unit are obtained based on the preset address configuration table. Among them, the preset address configuration table records the correspondence between each core unit in the target control unit and its corresponding configured address data.
[0062] It should be noted that the preset address configuration table refers to a table used to record the address data pre-configured for multiple core units of the target control unit. In other words, multiple IP and MAC addresses will be assigned to each multi-core ECU during development and design, that is, each core unit of the multi-core ECU will be assigned a corresponding IP address and MAC address, and the address allocation results can be listed in a table. At this time, if you want to test whether these addresses are configured correctly, you need to traverse and read all IP addresses and MAC addresses.
[0063] It should be noted that the present application can supply power to the target control unit through a programmable power supply, and the host computer can communicate and connect with the multi-core ECU that needs to be tested through a 100 / 1000BaseTx to 100 / 1000BaseT1 device. Specifically, the host computer can read the IP address and MAC address of each core unit in the target control unit based on the preset address configuration table, and because each core unit has a corresponding system, the host computer can send a test connection request to a first core unit in the target control unit to enter the core 1 system of the ECU. In other words, the host computer can progress to the system of a core unit of the multi-core ECU through a remote connection method, and the specific implementation of "remote connection" can include serial port method, SSH remote connection method, etc., as long as it can "enter" the system.
[0064] It should be noted that Table 1 is a schematic diagram of a multi-core ECU address table provided in an embodiment of the present application. The multi-core ECU includes three core units, namely core 1, core 2 and core 3. At this time, a corresponding IP address, MAC address and virtual local area network (VLAN) interface can be allocated to each core unit.
[0065]
[0066] Table 1
[0067] In some embodiments, see Figure 2 , Figure 2 This is another optional flow chart of the multi-core ECU testing method provided in the embodiment of the present application. Before step S110, the method may further include steps S210 to S220.
[0068] Step S210, performing a unit type test on the target control unit to obtain a unit state;
[0069] Step S220: If the unit state is in a waiting-for-test state, a test connection request for the first core unit in the target control unit is received.
[0070] In step S210 and step S220 of some embodiments, the unit state includes a state to be tested and a state not to be tested, the state to be tested is used to indicate that a multi-core test is performed on the target control unit, and the state not to be tested is used to indicate that a multi-core test is not performed on the target control unit. If the unit state is a state to be tested, a test connection request for the first core unit in the target control unit is received, that is, after determining that the target control unit is a multi-core ECU that needs to be tested, the target control unit can be powered on, at which time, the host computer sends a test connection request to the first core unit in the target control unit, enters the system of the first core unit, and thus tests the first core unit.
[0071] It should be noted that the state to be tested is used to indicate that the target control unit has completed the address configuration of multiple core units and needs to perform multi-core testing. The situation corresponding to the non-test state may include that the target control unit has completed the test; or the target control unit has not completed the address configuration and cannot be tested; or the target control unit currently has only one core unit and cannot perform multi-core testing, etc., which are not limited here.
[0072] In step S120 of some embodiments, the present application may perform inter-core testing on the first core unit based on the first address configuration data and the second address configuration data corresponding to each second core unit, so that the inter-core test result obtained may indicate the inter-core test between the first core unit and the plurality of second core units. The embodiments of the present application may improve the test accuracy of a multi-core ECU by controlling each core unit to perform inter-core testing between the controlled core unit and other core units.
[0073] In some embodiments, see Figure 3 , Figure 3 This is an optional flow chart of step S120 provided in the embodiment of the present application. Step S120 may specifically include but is not limited to steps S310 to S320.
[0074] Step S310, generating an inter-core test message corresponding to the second core unit based on the first address configuration data and the second address configuration data;
[0075] Step S320: Send corresponding inter-core test messages to the plurality of second core units, and determine the inter-core test result of the first core unit based on the response results of the plurality of inter-core test messages.
[0076] In step S310 and step S320 of some embodiments, after the first address configuration data and the second address configuration data are determined, a corresponding inter-core test message can be generated based on the first address configuration data and the second address configuration data corresponding to a second core unit. Further, the inter-core test message is sent to the corresponding second core unit, and the inter-core test result of the first core unit is determined based on the response results of multiple inter-core test messages. In other words, the first core unit can traverse the preset address configuration table, automatically send corresponding ICMP requests (i.e., inter-core test messages) to other second core units, and a response result (i.e., the response result of the inter-core test message) can be determined based on each ICMP request.
[0077] It should be noted that the inter-core test message is equivalent to the ping command of the network connectivity test, which pings each IP address in turn. For example, if the IP address of a second core unit is 192.168.3.1, the first core unit can ping 192.168.3.1. If a reply is received, it proves that the network connection between the first core unit and the second core unit at the 192.168.3.1 address is open. This method can verify whether the cores are connected.
[0078] It is understandable that after the host computer enters the system of the first core unit of the ECU through a remote connection, that is, in response to a test connection request to the first core unit in the target control unit, the first core unit can automatically configure address configuration data other than the first core unit, that is, the IP and MAC address tables.
[0079] In some embodiments, see Figure 4 , Figure 4 This is an optional flow chart of step S220 provided in the embodiment of the present application. Step S220 may specifically include but is not limited to steps S410 to S420.
[0080] Step S410, performing data detection on the response result of the inter-core test message based on the preset address configuration table to obtain a test sub-result;
[0081] Step S420 , determining a corresponding inter-core test result based on a plurality of test sub-results corresponding to the first core unit.
[0082] In step S410 of some embodiments, after obtaining the response result of each inter-core test message, data detection is performed on the response result of the inter-core test message to obtain a test sub-result, which is used to indicate the result of the inter-core test between the first core unit and a second core unit. In other words, receiving the response result of the inter-core test message does not mean that the communication connection between the two core units is normal, and it is necessary to further perform data detection on the response result of the inter-core test message to obtain a test sub-result.
[0083] In step S420 of some embodiments, the test sub-results include abnormal communication connection and normal communication connection. The abnormal communication connection indicates that the inter-core communication connection between the first core unit and the second core unit is abnormal, indicating that there is a problem with the communication between the core units. At this time, the problem can be reported to the developer for repair, otherwise the cores cannot interact with each other. Normal communication connection indicates that the inter-core communication connection between the first core unit and the second core unit is normal. Furthermore, if the test sub-results corresponding to the first core unit and multiple second core units are all normal communication connections, it can be determined that the inter-core test result corresponding to the first core unit is a normal test.
[0084] In some embodiments, data detection is performed on the response result of the inter-core test message based on the preset address configuration table to obtain the test sub-result, including:
[0085] If a response reply signal corresponding to the inter-core test message is not received within a preset time interval, the test sub-result is determined to be a communication connection abnormality; or,
[0086] If a response reply signal corresponding to the inter-core test message is received within a preset time interval, the response reply signal is parsed to obtain parsed data; the parsed data is verified based on a preset address configuration table to obtain a test sub-result.
[0087] It should be noted that if the first core unit does not receive a response reply signal corresponding to the inter-core test message sent to the second core unit within the preset time interval, it indicates that there is an abnormality in the inter-core communication connection between the first core unit and the second core unit, so the test sub-result can be directly determined as an abnormal communication connection. The preset time interval is a pre-set time for determining whether a response reply signal can be received, which can be 10 seconds, 30 seconds, etc., and is not limited here.
[0088] It should be noted that if a response reply signal corresponding to the inter-core test message is received within a preset time interval, it is necessary to further check whether the response reply signal is a correct response. Further, the response reply signal is subjected to signal parsing to obtain parsing data, and the parsing data is subjected to data verification based on a preset address configuration table to obtain a test sub-result. The parsing data includes a parsing response type, a response signal address data, and a response checksum data. Among them, the parsing response type is used to indicate the type of the response reply signal, that is, to ensure that the response type of the received response reply signal matches the type of the request sent. For example, if the inter-core test message sent is an I CMP Echo Request (type 8), then an I CMP Echo Rep ly (type 0) response reply signal should be received. The response signal address data refers to the MAC address and IP address of the source of the response reply signal, that is, the response signal address data can be used to check whether the source IP address in the response is consistent with the target IP address of the request sent, and at the same time confirm whether the source MAC address in the response is consistent with the target MAC address of the request sent. That is, the MAC address and IP address corresponding to the response reply signal must be consistent with the MAC address and IP address configured in the preset address configuration table of the second core unit sending it, to indicate that the address is correct. The response checksum data refers to the ICMP checksum of the response calculated based on the relevant data in the response reply signal, and compared with the checksum provided in the inter-core test message. If the two are the same, the response may be valid.
[0089] In some embodiments, see Figure 5 , Figure 5 This is an optional flow chart for determining a test sub-result provided by an embodiment of the present application. The parsed data includes a parsed response type, a response signal address data, and a response checksum data. The determination of the test sub-result may specifically include but is not limited to steps S510 to S550.
[0090] Step S510, obtaining the target response type and target checksum data of the corresponding second core unit from the preset address configuration table;
[0091] Step S520, performing type matching based on the target response type and the parsed response type to obtain a type matching result;
[0092] Step S530, performing address matching based on the response signal address data and the second address configuration data to obtain an address matching result;
[0093] Step S540, performing checksum matching based on the response checksum data and the target checksum data to obtain a checksum matching result;
[0094] Step S550, determining the test sub-result based on the type matching result, the address matching result and the checksum matching result.
[0095] In steps S510 to S550 of some embodiments, the target response type and target checksum data of the corresponding second core unit are obtained from the preset address configuration table. If the target response type is the same as the parsed response type, the type matching result is determined to be a successful type matching, otherwise the type matching result is determined to be a failed type matching. Further, if the response signal address data is the same as the address of the second address configuration data, that is, the IP address and the MAC address therein are both successfully matched, the address matching result is determined to be a successful address matching, otherwise the address matching result is determined to be a failed type matching. Further, if the response checksum data is the same as the target checksum data, the checksum matching result is determined to be a successful checksum matching, otherwise the checksum matching result is determined to be a failed checksum matching. Further, if the type matching result, the address matching result, and the checksum matching result are all successful, it can be determined that the test sub-result is a normal communication connection; if at least one of the type matching result, the address matching result, and the checksum matching result is a failed match, it can be determined that the test sub-result is an abnormal communication connection.
[0096] In the above embodiment, when the present application performs an inter-core test on a first core unit, it will first enter the system of the first core unit, and then automatically read the IP and MAC addresses one by one, and configure the IP and MAC address tables except for the first core unit. Further, all address tables are traversed and inter-core test messages, i.e., ICMP requests, are automatically sent to other second core units to verify whether the first core unit is connected to other core units. Further, if all correct ICMP responses are received, it means that the inter-core communication connection is normal.
[0097] In step S130 of some embodiments, after obtaining the inter-core test result corresponding to the first core unit, the test status of the first core unit can be updated to a tested state to clarify whether each core unit in the multi-core ECU has been tested. Further, the first core unit and the second core unit are updated based on multiple core units, and the test status corresponding to the updated first core unit is an untested state. In other words, the next core unit whose test status is an untested state is selected as the new first core unit to re-execute steps S110 to S120 for the new core unit. In this way, by traversing all core units connected to the multi-core ECU, the inter-core test of each core unit in the multi-core ECU can be completed.
[0098] In step S140 of some embodiments, if the test status of multiple core units included in the target control unit are all in the tested state, it means that each core unit in the multi-core ECU has completed the inter-core test. At this time, the target test result of the target control unit can be determined based on the multiple inter-core test results corresponding to the multiple core units. Specifically, if the multiple inter-core test results are all normal inter-core communication connections, it means that the inter-core ARP test of the target control unit has passed, that is, the target test result is a multi-core test pass; if at least one inter-core test result is a normal inter-core communication connection, it means that the inter-core ARP test of the target control unit has not passed, that is, the target test result is a multi-core test failure. At this time, it can be repaired according to the reported abnormal problem.
[0099] It should be noted that the host computer of the present application can record the ICMP communication data between each core unit, and then compare it with all the IP and MAC addresses read. If the address tables traversed by all cores receive the correct ICMP response, the inter-core ARP test of the multi-core ECU passes.
[0100] It should be noted that for an erroneous ICMP response, it may be that the MAC or IP address in the ARP table is incorrectly configured, and for a non-reply response, it may be that the ARP table (ie, the preset address configuration table) is not configured.
[0101] For examples, see Figure 6 , Figure 6 It is a specific structural diagram of realizing the automatic test of multi-core ECU provided by the embodiment of the present application. The device for realizing the automatic test of multi-core ECU in the present application includes a host computer, a program-controlled power supply, a converter (such as a 100 / 1000BaseTx to 100 / 1000BaseT1 device) and a multi-core ECU, wherein the multi-core ECU includes a switch (used to realize the rapid forwarding of data within the network, ensure the correct transmission and reception of data, support multiple ports, allow multiple devices to be connected to the network, and perform data communication through these ports), core unit 1 to core unit n, n is the total number of core units contained in the multi-core ECU. Specifically, the program-controlled power supply supplies power to the multi-core ECU, and the host computer is connected to the multi-core ECU through the 100 / 1000BaseTx to 100 / 1000BaseT1 device, and enters the system of the corresponding core unit by sending a test connection request to a core unit in the target control unit to perform inter-core testing on the core unit.
[0102] In one embodiment, see Figure 7 , Figure 7 It is a specific flow chart of a multi-core ECU testing method provided in an embodiment of the present application. The method may specifically include but is not limited to steps S710 to S780.
[0103] Step S710, start;
[0104] Step S720, whether there is a multi-core test, if so, execute step S730; if not, execute step S780.
[0105] This step is used to determine whether the ECU (ie, the target control unit) is a device that needs to be tested for multi-core.
[0106] Step S730, supplying power to the ECU performing the multi-core test;
[0107] Step S740, testing a core of the ECU.
[0108] This step may be to select a core unit as the first core unit according to the number of the core units or randomly, so as to perform the inter-core test based on the first core unit.
[0109] Step S750, traverse the preset address configuration table, send an ICMP request, and determine the inter-core test result of the test core.
[0110] Among them, this step is to send an I CMP-based inter-core test message to each second core unit after determining a first core unit and corresponding multiple second core units, and determine the inter-core test result of the first core unit based on the response results of multiple inter-core test messages.
[0111] Step S760, whether there is a core to be tested, if so, execute step S740; if not, execute step S770.
[0112] After obtaining the inter-core test result corresponding to the core to be tested (i.e., the first core unit), the test status of the core to be tested can be updated to the tested status, and a core unit in the untested status can be re-determined from other core units of the ECU as a new test core. If all the core units contained in the ECU have been tested, the target test result of the ECU can be determined based on the inter-core test results corresponding to multiple core units.
[0113] Step S770, determining the target test result of the ECU;
[0114] Step S780, end.
[0115] A test method based on a multi-core ECU provided in an embodiment of the present application can be applied to the test of a multi-core controller of an in-vehicle Ethernet, and a static ARP configuration test of inter-core communication is implemented by automatically traversing the IP and MAC address tables. Compared with the related art, which is simply a process of judging whether the ECU as a whole can communicate, the present application controls the connection of each core unit in the target control unit, thereby performing an inter-core test between the controlled core unit and other core units, and determines the target test result of the target control unit based on the inter-core test results corresponding to the multiple core units. In other words, the present application realizes the connection of each core of the multi-core controller by setting up a test environment, and solves the ARP test problem of inter-core communication of the multi-core controller through an automated test method. Therefore, the present application can improve the test accuracy of the multi-core ECU, thereby improving the network communication and stability of the test domain controller.
[0116] See also Figure 8 The embodiment of the present application further provides a test device based on a multi-core ECU, which can implement the above-mentioned test method based on a multi-core ECU, and the device includes:
[0117] The acquisition module 810 is used to respond to the test connection request for the first core unit in the target control unit, and acquire the first address configuration data of the first core unit and the second address configuration data of the second core unit in the target control unit based on the preset address configuration table; wherein the target control unit includes a plurality of core units, the first core unit is used to indicate the core unit currently being tested in the target control unit, and the second core unit is used to indicate the core unit currently not being tested in the target control unit;
[0118] A testing module 820 is used to perform an inter-core test on the first core unit based on the first address configuration data and the second address configuration data to obtain an inter-core test result; wherein the inter-core test result is used to indicate the inter-core test on the first core unit;
[0119] An updating module 830, configured to update the test status of the first core unit to a tested status, and update the first core unit and the second core unit based on the plurality of core units, wherein the test status corresponding to the updated first core unit is an untested status;
[0120] The determination module 840 is used to determine the target test result of the target control unit based on the inter-core test results corresponding to the multiple core units if the test states of the multiple core units included in the target control unit are all in the tested state.
[0121] The specific implementation of the multi-core ECU-based test device is basically the same as the specific implementation of the multi-core ECU-based test method applied to the client described above, and will not be repeated here.
[0122] The embodiment of the present application also provides a controller, which includes at least one processor; at least one memory for storing at least one program; when the at least one program is executed by the at least one processor, the at least one processor implements the multi-core ECU test method of the embodiment of the present application. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0123] See also Fig. 9 , Fig. 9 The hardware structure of a controller of another embodiment is illustrated, and the controller includes:
[0124] The processor 910 may be implemented by a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0125] The memory 920 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 920 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 920, and the processor 910 calls and executes the test method based on the multi-core ECU in the embodiment of this application;
[0126] Input / output interface 930, used to implement information input and output;
[0127] Communication interface 940, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
[0128] bus 950 , which transmits information between the various components of the device (e.g., processor 910 , memory 920 , input / output interface 930 , and communication interface 940 );
[0129] The processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 are connected to each other in communication within the device via a bus 950 .
[0130] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned test method based on multi-core ECU is implemented.
[0131] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory 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 embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor 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.
[0132] The embodiment of the present application also provides a vehicle, which includes the above-mentioned vehicle-mounted camera, vehicle equipment, or the above-mentioned multi-core ECU-based test device. The vehicle provided in the embodiment of the present application can be a gasoline vehicle or a new energy vehicle. When the vehicle is a new energy vehicle, it can be a hybrid vehicle or a pure electric vehicle.
[0133] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0134] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0135] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0136] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0137] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0138] It should be understood that in the present application, "at least one (item)" refers to one or more, "multiple" refers to two or more, "each" refers to each of the corresponding multiple, and "any" refers to any one of the multiple. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0139] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0140] The units described above 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.
[0141] 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.
[0142] 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 multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0143] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A testing method based on multi-core ECU, characterized in that: The method comprises: In response to a test connection request for a first core unit in a target control unit, first address configuration data of the first core unit and second address configuration data of a second core unit in the target control unit are acquired based on a preset address configuration table; wherein the target control unit includes a plurality of core units, the first core unit is used to indicate a core unit currently being tested in the target control unit, and the second core unit is used to indicate a core unit currently not being tested in the target control unit; Performing an inter-core test on the first core unit based on the first address configuration data and the second address configuration data to obtain an inter-core test result; wherein the inter-core test result is used to indicate an inter-core test between the first core unit and a plurality of the second core units; The test state of the first core unit is updated to a tested state, and the first core unit and the second core unit are updated based on the plurality of the core units, and the test state corresponding to the updated first core unit is an untested state; If the test status of the plurality of core units included in the target control unit are all in the tested status, the target test result of the target control unit is determined based on the inter-core test results corresponding to the plurality of core units.
2. The method according to claim 1, characterized in that The performing an inter-core test on the first core unit based on the first address configuration data and the second address configuration data to obtain an inter-core test result includes: Generate an inter-core test message corresponding to the second core unit based on the first address configuration data and the second address configuration data; The corresponding inter-core test messages are sent to the plurality of the second core units, and the inter-core test result of the first core unit is determined based on the response results of the plurality of the inter-core test messages.
3. The method according to claim 2, characterized in that The determining the inter-core test result of the first core unit based on the response results of the plurality of inter-core test messages includes: Performing data detection on the response result of the inter-core test message based on the preset address configuration table to obtain a test sub-result; wherein the test sub-result is used to indicate the inter-core test between the first core unit and one of the second core units; The corresponding inter-core test result is determined based on the multiple test sub-results corresponding to the first core unit.
4. The method according to claim 3, characterized in that The step of performing data detection on the response result of the inter-core test message based on the preset address configuration table to obtain a test sub-result includes: If a response reply signal corresponding to the inter-core test message is not received within a preset time interval, it is determined that the test sub-result is a communication connection abnormality; or, If a response reply signal corresponding to the inter-core test message is received within a preset time interval, the response reply signal is parsed to obtain parsed data; and the parsed data is verified based on the preset address configuration table to obtain the test sub-result.
5. The method according to claim 4, characterized in that The parsed data includes a parsed response type, a response signal address data, and a response checksum data. The parsed data is checked based on the preset address configuration table to obtain the test sub-result, including: Acquire the corresponding target response type and target checksum data of the second core unit from the preset address configuration table; Perform type matching based on the target response type and the parsed response type to obtain a type matching result; Performing address matching based on the response signal address data and the second address configuration data to obtain an address matching result; Performing checksum matching based on the response checksum data and the target checksum data to obtain a checksum matching result; The test sub-result is determined based on the type matching result, the address matching result and the checksum matching result.
6. The method according to claim 1, characterized in that Before responding to the test connection request to the first core unit in the target control unit, the method further includes: Performing a unit type test on the target control unit to obtain a unit state; wherein the unit state includes a pending test state, and the pending test state is used to indicate that a multi-core test is performed on the target control unit; If the unit state is the waiting-for-test state, a test connection request for the first core unit in the target control unit is received.
7. A test device based on multi-core ECU, characterized in that: The device comprises: an acquisition module, configured to respond to a test connection request for a first core unit in a target control unit, and acquire first address configuration data of the first core unit and second address configuration data of a second core unit in the target control unit based on a preset address configuration table; wherein the target control unit includes a plurality of core units, the first core unit is used to indicate a core unit currently being tested in the target control unit, and the second core unit is used to indicate a core unit currently not being tested in the target control unit; A testing module, configured to perform an inter-core test on the first core unit based on the first address configuration data and the second address configuration data, and obtain an inter-core test result; wherein the inter-core test result is used to indicate the inter-core test on the first core unit; An updating module, configured to update the test status of the first core unit to a tested status, and update the first core unit and the second core unit based on a plurality of the core units, wherein the test status corresponding to the updated first core unit is an untested status; A determination module is used to determine a target test result of the target control unit based on the inter-core test results corresponding to the multiple core units if the test states of the multiple core units included in the target control unit are all in the tested state.
8. A controller, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
10. A vehicle, characterized in that: The vehicle comprises: The host computer is used to send a test connection request of the first core unit to the target control unit; and A controller as claimed in claim 8.
Citation Information
Patent Citations
Test synchronization method and device, equipment and storage medium
CN114490199A
System performance test method, device, equipment, medium and program product
CN115981980A
Test method and apparatus for memory chip, storage medium and electronic device
WO2023168817A1
Cited By
Data transmission method and device
CN119728017A
