Signal testing method and system of domain controller, computer program product and vehicle
By receiving signal test instructions and controlling relay circuits to connect the host computer and multiple signal lines, send wake-up signals and parse messages, the problem of low intelligence in domain controller signal testing is solved, and automated testing of multiple signal lines is realized. And message reply time monitoring improves test efficiency.
Patent Information
- Application Number
- CN202410830946.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-06-25
AI Technical Summary
In the existing technology, the signal testing of domain controllers has a low degree of intelligence, and it is impossible to test multiple LIN signals and determine the message reply time at the same time, resulting in low testing efficiency.
By receiving signal test instructions, the target signal line is determined, the relay circuit is connected to the host computer and multiple signal lines, the wake-up signal is sent and the target message is received, and the test results of the signal line are judged based on the message content, including communication failure and message loss. Condition.
It realizes automated testing of multiple signal lines of domain controllers, improves the intelligence of the test, can test multiple signal lines at the same time and determine communication faults and message reply times, improving test efficiency.
Smart Images

Figure CN118760118A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of signal testing of a vehicle domain controller, and in particular to a signal testing method, system, computer program product and vehicle for a domain controller. Background Art
[0002] As the number of local interconnect network (LIN) communication signals of new domain controllers gradually increases, the demand for LIN communication test efficiency is also gradually increasing. At present, some domain controllers have as many as 8 or even 12 LIN signals. It is cumbersome to manually perform communication tests on each channel, and the message response time needs to be monitored during subsequent environmental durability experiments. Timeout responses will result in error processing. Manual communication tests on a single channel cannot simultaneously perform communication tests on multiple LIN signals and determine the message response time. This results in a low level of intelligence in testing the domain controller's signals.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] Embodiments of the present invention provide a signal testing method, system, computer program product, and vehicle for a domain controller, so as to at least solve the technical problem of low intelligence level in testing the signal of a domain controller in the related art.
[0005] According to one aspect of an embodiment of the present invention, a signal testing method for a domain controller is provided, which is applied to a host computer, and the method comprises: in response to receiving a signal testing instruction for testing the domain controller, determining a target signal line corresponding to the signal testing instruction from multiple signal lines of the domain controller; controlling a relay circuit to be in a target state corresponding to the target signal line, wherein different signal lines to be tested correspond to different states of the relay circuit, and the relay circuit is used to connect the host computer and the multiple signal lines; sending a wake-up signal to the domain controller via a controller local area network bus, and receiving a target message returned by the domain controller via the target signal line; and determining a test result of the target signal line based on the target message, wherein the test result is used to characterize whether a communication failure occurs in the target signal line.
[0006] Optionally, the relay circuit includes multiple switches, and controlling the relay circuit to be in a target state corresponding to the target signal line includes: determining a target switch corresponding to the target signal line among multiple switches; controlling the target switch to be turned on so that the host computer is connected to the target signal line; controlling other switches among the multiple switches except the target switch to be turned off so that the host computer is disconnected from other signal lines among the multiple signal lines except the target signal line.
[0007] Optionally, based on the target message, the test result of the target signal line is determined, including: parsing the target message to determine the target baud rate of the target message; in response to the target baud rate being consistent with a preset baud rate corresponding to the target signal line, determining that the test result is that there is no communication failure in the target signal line; in response to the target baud rate being inconsistent with a preset baud rate corresponding to the target signal line, determining that the test result is that there is a communication failure in the target signal line.
[0008] Optionally, based on the target message, determining the test result of the target signal line includes: obtaining a preset message corresponding to the target signal line; in response to the target message being consistent with the preset message, determining that the test result is that there is no communication failure in the target signal line; in response to the target message being inconsistent with the preset message, determining that the test result is that there is a communication failure in the target signal line.
[0009] Optionally, before sending the wake-up signal to the domain controller via the controller area network bus, the method further includes: determining a bus address of the domain controller; and generating the wake-up signal based on the bus address and a preset baud rate corresponding to the target message.
[0010] Optionally, before determining the test result of the target signal line based on the target message, the method also includes: parsing the target message to obtain a target timestamp of the target message, wherein the target timestamp is used to represent the time when the domain controller sends the target message; based on the target timestamp, determining a target reply time corresponding to the target message, wherein the target reply time is used to represent the time from when the domain controller sends the target message to when the host computer receives the target message; in response to the target reply time being greater than a preset reply time, determining that the target message is lost; in response to the target reply time being less than or equal to the preset reply time, determining the test result based on the target message.
[0011] According to another aspect of an embodiment of the present invention, there is also provided a signal testing system for a domain controller, comprising: a domain controller, comprising multiple signal lines; a relay circuit, wherein multiple first ends of the relay circuit are respectively connected one-to-one with the multiple signal lines; a host computer, wherein an input end of the host computer is connected to a second end of the relay circuit, and an output end of the host computer is connected to the domain controller via a controller local area network bus, wherein the host computer is used to execute any one of the methods in the above embodiments.
[0012] Optionally, the relay circuit includes: a plurality of switches, wherein first ends of the plurality of switches are connected to the plurality of signal lines in a one-to-one correspondence, and second ends of the plurality of switches are connected to an input end of the host computer.
[0013] Optionally, the system further includes: a first converter, a first end of the first converter is connected to an output end of a host computer via a universal serial bus, and a second end of the first converter is connected to a domain controller via a controller area network bus.
[0014] Optionally, the system further includes: a second converter, a first end of the second converter is connected to a second end of the relay circuit via a local interconnection network signal line, and a second end of the second converter is connected to a host computer via a universal serial bus.
[0015] According to another aspect of the embodiments of the present invention, a vehicle is provided, including: a signal testing system of the domain controller in each embodiment of the present invention.
[0016] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0017] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0018] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0019] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.
[0020] In an embodiment of the present invention, in response to receiving a signal test instruction for testing a domain controller, a target signal line corresponding to the signal test instruction is determined from multiple signal lines of the domain controller; a relay circuit is controlled to be in a target state corresponding to the target signal line, wherein different signal lines to be tested correspond to different states of the relay circuit, and the relay circuit is used to connect the host computer and the multiple signal lines; a wake-up signal is sent to the domain controller through the controller local area network bus, and a target message returned by the domain controller is received through the target signal line; based on the target message, a test result of the target signal line is determined, wherein the test result is used to characterize whether a communication failure occurs in the target signal line. It is easy to notice that, through the signal test instruction, the multiple signal lines of the domain controller can be automatically tested at the same time, and in addition, the test result of the target signal line of the domain controller can be determined at the same time based on the target message, which improves the intelligence of testing the signal line of the domain controller, and achieves the purpose of being able to intelligently test the signal of the domain controller, thereby achieving a more intelligent technical effect of testing the signal of the domain controller, thereby solving the technical problem of low intelligence of testing the signal of the domain controller in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0022] Figure 1 is a flow chart of a signal testing method for a domain controller according to an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of an optional signal testing system for a domain controller according to an embodiment of the present invention;
[0024] Figure 3 is a schematic diagram of an optional relay circuit according to an embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of a signal testing system for a domain controller according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Example 1
[0029] According to an embodiment of the present invention, an embodiment of a signal testing method for a domain controller is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0030] Figure 1 is a flow chart of a signal testing method for a domain controller according to an embodiment of the present invention, the method is applied to a host computer, such as Figure 1 As shown, the method comprises the following steps:
[0031] Step S102: in response to receiving a signal test instruction for testing the domain controller, determining a target signal line corresponding to the signal test instruction from multiple signal lines of the domain controller.
[0032] The above-mentioned vehicle can be any one or more vehicles equipped with a domain controller in the prior art, and the specific type is not limited in this embodiment. The above-mentioned domain controller can be any one or more domain controllers that can send LIN communication signals, for example, it can include but is not limited to: LIN bus master controller, LIN bus slave controller, LIN bus master-slave controller. The above-mentioned signal test instruction can be a signal test instruction obtained by the host computer after the user inputs the content for testing the signal line of the domain controller in the user interface of the host computer, and the host computer recognizes the content, wherein the content input by the user can be a test of one signal line or a test of multiple signal lines, and the user can input text or voice in the user interface of the host computer, but is not limited to this. The above-mentioned target signal line can be a signal line that is opposite to the signal test instruction and needs to test the LIN communication signal, wherein the number of target signal lines can be one or more, and the specific number can be determined according to the actual test requirements, which is not limited in this embodiment.
[0033] The above-mentioned host computer (also called host computer, host software or host system) is a computer system or software that communicates and controls one or more slave computers (usually embedded systems, microcontrollers or other types of low-level processors). The host computer is usually used to realize the monitoring, control and data processing functions of the slave computers. The main features and functions of the host computer are as follows: User interface: The host computer usually provides a user-friendly graphical interface, which enables users to easily interact with the system, view real-time data, set parameters or perform other operations. Data processing: The host computer can process, analyze and visualize the data received from the slave computer so that users can better understand and use the data. Control function: The host computer can send control commands to the slave computer to realize the control of the slave computer. For example, it can adjust the working parameters of the equipment, start or stop the equipment, etc. Communication: The host computer exchanges data with the slave computer through various communication protocols. System integration: The host computer can be integrated with other systems or equipment to realize more advanced functions, such as remote monitoring, fault diagnosis, predictive maintenance, etc. Scalability: The host computer can be expanded as needed to adapt to different application scenarios and requirements. In the fields of industrial automation, Internet of Things, smart home, etc., the coordinated use of the host computer and the slave computer can improve the flexibility, reliability and ease of use of the system.
[0034] In an optional embodiment, when it is necessary to test the signal of the domain controller, in order to improve the intelligence level of the signal test of the domain controller, in this embodiment, the user can first input the content for testing the signal of the domain controller in the user interface of the host computer. For example, the user can input the text "test the LIN communication signal of the signal line numbered 1 of the domain controller" in the user interface of the host computer. At this time, after the host computer parses the received content, it can obtain the signal test instruction of "test the LIN communication signal of the signal line numbered 1 of the domain controller". When the signal test instruction for testing the domain controller is received, the signal line numbered 1 (i.e., the target signal line) corresponding to the signal test instruction can be determined from the multiple signal lines of the domain controller. For another example, the user can input the text "test the LIN communication signal of the signal lines numbered 1 and 2 of the domain controller" in the user interface of the upper computer. At this time, after the upper computer parses the received content, it can obtain the signal test instruction "test the LIN communication signal of the signal lines numbered 1 and 2 of the domain controller". When the signal test instruction to test the domain controller is received, the signal lines numbered 1 and 2 (i.e., the target signal lines) corresponding to the signal test instruction can be determined from the multiple signal lines of the domain controller.
[0035] Step S104, controlling the relay circuit to be in a target state corresponding to the target signal line, wherein different signal lines to be tested correspond to different states of the relay circuit, and the relay circuit is used to connect the host computer and multiple signal lines.
[0036] The above relay circuit is used to connect the host computer and multiple signal lines, wherein the relay circuit includes multiple switches, the first end of each switch is connected to the multiple signal lines one by one, and the second end of each switch is connected to the input end of the host computer. The states of different signal lines to be tested are consistent with the states of different corresponding switches in the relay circuit. The above target state can be that the target signal line is connected to the host computer but is not limited thereto.
[0037] In an optional embodiment, when the target signal line is determined, the relay circuit can be controlled to be in the target state corresponding to the target signal line. For example, the target switch corresponding to the target signal line can be determined first among multiple switches, and then the target switch can be controlled to be turned on so that the host computer is connected to the target signal line, and then the LIN communication line number of the target signal line can be tested by the host computer.
[0038] It should be noted that in order to ensure that the host computer can accurately test the LIN communication signal of the target signal line, after determining the target signal line, it is also possible to control the multiple switches of the relay except the target switch to be disconnected, so as to disconnect the host computer from the multiple signal lines except the target signal line.
[0039] Step S106, sending a wake-up signal to the domain controller via the controller area network bus, and receiving a target message returned by the domain controller via the target signal line.
[0040] The above-mentioned controller area network (CAN) bus is used to send the wake-up signal sent by the host computer to the controller. The above-mentioned target message can be a message returned by the domain controller to the host computer through the target signal line, which can indicate that the domain controller has been awakened, wherein the specific content of the target message can include but is not limited to: the timestamp when the domain controller is awakened, and the timestamp when the domain controller sends the target message.
[0041] In an optional embodiment, Figure 2 is a schematic diagram of an optional signal testing system for a domain controller according to an embodiment of the present invention, such as Figure 2 As shown, the system includes: a host computer 21, a controller area network bus (such as Figure 2 22, the domain controller 23, and the multiple signal lines of the domain controller 23 ( Figure 2 In the figure, the black thick solid lines represent the multi-channel signal lines) 24, and the relay circuit 25. Figure 2 As shown, the host computer 21 is connected to the domain controller 23 via the CAN bus 22, the multi-channel signal line 24 and the relay 25, wherein the host computer 21 is connected to the CAN bus 22, the multi-channel signal line 24 and the relay 25 via USB.
[0042] In another optional embodiment, when the control relay circuit is in the target state corresponding to the target signal line, the upper computer can send a wake-up signal to the domain controller via the CAN bus. After the domain controller receives the wake-up signal, it indicates that the domain controller is successfully awakened. At this time, the domain controller can return the target message to the upper computer via the target signal line.
[0043] It should be noted that different signal lines to be tested correspond to different relay switch positions and different specific frame messages.
[0044] Step S108, determining a test result of the target signal line based on the target message, wherein the test result is used to indicate whether a communication failure occurs on the target signal line.
[0045] The above test results may include but are not limited to: no communication failure occurs on the target signal line, and a communication failure occurs on the target signal line.
[0046] In an optional embodiment, when the host computer receives the target message, the test result of the target signal line can be determined based on the target message. For example, first, the preset message corresponding to the target signal line can be obtained, and then the target message can be compared with the preset message. In response to the consistency between the preset message and the target message, it can be determined that there is no communication failure in the target signal line. Conversely, it can be determined that there is a communication failure in the target signal line. Among them, the preset message can be a message sent by the target signal line that has been determined to communicate normally. The specific content of the preset message can include but is not limited to: the timestamp when the domain controller receives the wake-up signal, and the timestamp when the domain controller sends the message.
[0047] For another example, the target message can also be parsed to determine the target baud rate of the target message, and then the target baud rate can be compared with the preset baud rate. When the target baud rate is consistent with the preset baud rate, it can be determined that there is no communication abnormality in the target signal line. Conversely, it can be indicated that there is a communication abnormality in the target signal line. Among them, the preset baud rate can be the baud rate of the target signal line that has been determined to communicate normally. Among them, the baud rate (Baud Rate) is a unit of measurement for the data transmission rate of a communication system, which is used to describe the speed of the signal rate. The baud rate is expressed in the number of information bits transmitted per second, usually in baud as the unit of measurement. The baud rate indicates how many bits of information can be transmitted in one second.
[0048] In an embodiment of the present invention, in response to receiving a signal test instruction for testing a domain controller, a target signal line corresponding to the signal test instruction is determined from multiple signal lines of the domain controller; a relay circuit is controlled to be in a target state corresponding to the target signal line, wherein different signal lines to be tested correspond to different states of the relay circuit, and the relay circuit is used to connect the host computer and the multiple signal lines; a wake-up signal is sent to the domain controller through the controller local area network bus, and a target message returned by the domain controller is received through the target signal line; based on the target message, a test result of the target signal line is determined, wherein the test result is used to characterize whether a communication failure occurs in the target signal line. It is easy to notice that, through the signal test instruction, the multiple signal lines of the domain controller can be automatically tested at the same time, and in addition, the test result of the target signal line of the domain controller can be determined at the same time based on the target message, which improves the intelligence of testing the signal line of the domain controller, and achieves the purpose of being able to intelligently test the signal of the domain controller, thereby achieving a more intelligent technical effect of testing the signal of the domain controller, thereby solving the technical problem of low intelligence of testing the signal of the domain controller in the related art.
[0049] Optionally, the relay circuit includes multiple switches, and controlling the relay circuit to be in a target state corresponding to the target signal line includes: determining a target switch corresponding to the target signal line among multiple switches; controlling the target switch to be turned on so that the host computer is connected to the target signal line; controlling other switches among the multiple switches except the target switch to be turned off so that the host computer is disconnected from other signal lines among the multiple signal lines except the target signal line.
[0050] In an optional embodiment, Figure 3 is a schematic diagram of an optional relay circuit according to an embodiment of the present invention, such as Figure 3 As shown, the relay circuit 25 includes: multiple switches 25-1-1, 25-1-2, ···, 25-1-N, wherein the first ends of the multiple switches 25-1-1, 25-1-2, ···, 25-1-N are connected one-to-one with the multiple signal lines 24-1, 24-2, ···, 24-N of the domain controller 23, and the second ends of the multiple switches 25-1-1, 25-1-2, ···, 25-1-N are connected to the input end of the host computer 21.
[0051] In another optional embodiment, when determining the target signal line, first, the target switch corresponding to the target signal line among multiple switches can be determined, and then the target switch can be controlled to be turned on so that the host computer is connected to the target signal line, and then other switches among the multiple switches except the target switch can be controlled to be turned off so that the host computer is disconnected from other signal lines among the multiple signal lines except the target signal line.
[0052] Optionally, based on the target message, the test result of the target signal line is determined, including: parsing the target message to determine the target baud rate of the target message; in response to the target baud rate being consistent with a preset baud rate corresponding to the target signal line, determining that the test result is that there is no communication failure in the target signal line; in response to the target baud rate being inconsistent with a preset baud rate corresponding to the target signal line, determining that the test result is that there is a communication failure in the target signal line.
[0053] In an optional embodiment, when receiving the target message returned by the controller, the upper computer can first parse the target message to obtain the target baud rate of the target message. Secondly, the upper computer can compare the target baud rate with the preset baud rate corresponding to the target signal line. When the target baud rate is consistent with the preset baud rate, it can be determined that the test result is that there is no communication failure in the target signal line. When the target baud rate is inconsistent with the preset baud rate, it can be determined that the test result is that there is a communication failure in the target signal line.
[0054] Optionally, based on the target message, determining the test result of the target signal line includes: obtaining a preset message corresponding to the target signal line; in response to the target message being consistent with the preset message, determining that the test result is that there is no communication failure in the target signal line; in response to the target message being inconsistent with the preset message, determining that the test result is that there is a communication failure in the target signal line.
[0055] In an optional embodiment, when receiving the target message returned by the controller, the upper computer can first obtain the preset message corresponding to the target signal line, and secondly compare the target message with the preset message. When the content of the preset message is consistent with the content of the target message, it can be determined that the test result is that there is no communication failure in the target signal line. When the content of the target message is inconsistent with the preset message, it can be determined that the test result is that there is a communication failure in the target signal line.
[0056] Optionally, before sending the wake-up signal to the domain controller via the controller area network bus, the method further includes: determining a bus address of the domain controller; and generating the wake-up signal based on the bus address and a preset baud rate corresponding to the target message.
[0057] In an optional embodiment, the host computer can first configure the address and baud rate of the CAN bus of the domain controller, and then input a specified wake-up message to the domain controller to complete the LIN wake-up, configure the LIN baud rate in turn, and can simultaneously perform LIN message reception and transmission and time monitoring.
[0058] Optionally, before determining the test result of the target signal line based on the target message, the method also includes: parsing the target message to obtain a target timestamp of the target message, wherein the target timestamp is used to represent the time when the domain controller sends the target message; based on the target timestamp, determining a target reply time corresponding to the target message, wherein the target reply time is used to represent the time from when the domain controller sends the target message to when the host computer receives the target message; in response to the target reply time being greater than a preset reply time, determining that the target message is lost; in response to the target reply time being less than or equal to the preset reply time, determining the test result based on the target message.
[0059] The above-mentioned preset recovery time can be set in advance by the user and is used to determine whether the target message is lost. The specific duration of the recovery time is not limited in this embodiment and the user can set it according to actual test requirements.
[0060] In an optional embodiment, after receiving the target message, the host computer can first parse the target message to obtain the target timestamp of the target message, and then determine the target reply time corresponding to the target message based on the target timestamp, and then compare the target reply time with the preset reply time. If the target reply time is greater than the preset reply time, it can be determined that the target message is lost. If the target reply time is less than or equal to the preset reply time, the test result can be determined based on the target message. Among them, the target timestamp is used to represent the time when the domain controller sends the target message, and the target reply time is used to represent the time from when the domain controller sends the target message to when the host computer receives the target message.
[0061] The present invention describes a multi-channel LIN automated testing scheme for a domain controller. In the present invention, the controller is the master and the host computer is the slave. The LIN signal is awakened through the CAN. The address and baud rate of the CAN are configured, and the specified wake-up message is input to complete the awakening of the LIN. The baud rate of the LIN is configured in sequence, and the LIN message can be sent and received and the time monitoring can be performed synchronously. The message can be monitored by the timestamp whether it is lost. Among them, the automated testing program of the LIN requires the cooperation of the graphical programming language and the automated testing software in the host computer. LIN is different from the CAN signal, and each address of the CAN signal is different. Therefore, multiple CAN signals can be connected in parallel through a CAN box, and the corresponding address of each program is fixed. The automated testing of the CAN signal can be completed by running in sequence. The automated testing of the LIN signal requires the intervention of a relay, because the address of the LIN signal is the same. Only when a specific frame message is recognized, data upload will be performed. If the relay is not used, it will be impossible to distinguish which channel is uploading data in the end. Through the upper computer relay driver configuration, the switches corresponding to each LIN signal are specified and fixed. Multiple LIN automated test software programs are used to test multiple LIN channels. The only difference between each automated test software program is that different LIN signals correspond to different relay switch positions and different specific frame messages. Finally, the automated test software program for multiple LIN channels is imported into the graphical programming language, and the automated test is completed through a simple sequential structure and hardware connection.
[0062] The embodiment of the present invention discloses an automated testing solution for multi-channel LIN of a domain controller, which completes the automated testing of multi-channel LIN through software tool chain and hardware connection, mainly to solve the problem of low efficiency when performing manual communication testing of multi-channel LIN, and directly reads the return message of multi-channel LIN and generates a report through the corresponding upper computer and the lower computer setting. Its beneficial effect is to speed up the efficiency of manual communication testing, and can monitor the time of LIN return message, if there is a problem, accurately locate which message is lost.
[0063] Example 2
[0064] According to another aspect of an embodiment of the present invention, a signal testing system for a domain controller is provided.
[0065] Figure 4 is a schematic diagram of a signal testing system for a domain controller according to an embodiment of the present invention. Figure 4As shown, the system includes: a domain controller 23, a relay circuit 25, a host computer 21, a controller area network bus 22 and multiple signal lines 24-1, 24-2, ..., 24-N, wherein the relay circuit 25 includes a plurality of first terminals 25-2-1, 25-2-2, ..., 25-2-N, and a second terminal 25-3. Figure 4 It can be seen that the multiple first ends 25-2-1, 25-2-2, ..··, 25-2-N of the relay circuit 25 are respectively connected one-to-one with the multiple signal lines 24-1, 24-2, ..··, 24-N of the domain controller 23, the input end of the host computer 21 is connected to the second end 25-3 of the relay circuit 25, and the output end of the host computer 21 is connected to the domain controller 23 through the controller local area network bus 22.
[0066] The domain controller includes multiple signal lines, and the host computer is used to execute any one of the methods in the above embodiments.
[0067] Optionally, the relay circuit includes: a plurality of switches, wherein first ends of the plurality of switches are connected to the plurality of signal lines in a one-to-one correspondence, and second ends of the plurality of switches are connected to an input end of the host computer.
[0068] In an optional embodiment, the relay circuit includes a plurality of switches, the first ends of the plurality of switches are connected to the plurality of signal lines in a one-to-one correspondence, and the second ends of the plurality of switches are connected to the input end of the host computer.
[0069] Optionally, the system further includes: a first converter, a first end of the first converter is connected to an output end of a host computer via a universal serial bus, and a second end of the first converter is connected to a domain controller via a controller area network bus.
[0070] In an optional embodiment, the system further includes: a first converter, a first end of the first converter is connected to an output end of a host computer via a universal serial bus, and a second end of the first converter is connected to a domain controller via a controller area network bus.
[0071] Optionally, the system further includes: a second converter, a first end of the second converter is connected to a second end of the relay circuit via a local interconnection network signal line, and a second end of the second converter is connected to a host computer via a universal serial bus.
[0072] In an optional embodiment, the system further includes: a second converter, a first end of the second converter is connected to a second end of the relay circuit via a local interconnect network signal line, and a second end of the second converter is connected to a host computer via a universal serial bus.
[0073] Example 3
[0074] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.
[0075] Example 4
[0076] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0077] Example 5
[0078] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.
[0079] Example 6
[0080] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0081] Example 7
[0082] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.
[0083] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0084] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0085] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, 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 units or modules, which can be electrical or other forms.
[0086] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0087] In addition, each functional unit in each embodiment of the present invention 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.
[0088] 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 invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0089] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A signal testing method for a domain controller, characterized in that: Applied to a host computer, the method includes: In response to receiving a signal test instruction for testing the domain controller, determining a target signal line corresponding to the signal test instruction from multiple signal lines of the domain controller; Controlling the relay circuit to be in a target state corresponding to the target signal line, wherein different signal lines to be tested correspond to different states of the relay circuit, and the relay circuit is used to connect the host computer and the multiple signal lines; Sending a wake-up signal to the domain controller via the controller area network bus, and receiving a target message returned by the domain controller via the target signal line; Based on the target message, a test result of the target signal line is determined, wherein the test result is used to indicate whether a communication failure occurs on the target signal line.
2. The method according to claim 1, characterized in that The relay circuit includes a plurality of switches, and controlling the relay circuit to be in a target state corresponding to the target signal line includes: Determine a target switch corresponding to the target signal line among the plurality of switches; Controlling the target switch to be turned on so that the host computer is connected to the target signal line; The switches other than the target switch in the plurality of switches are controlled to be disconnected, so that the host computer is disconnected from the signal lines other than the target signal line in the plurality of signal lines.
3. The method according to claim 1, characterized in that Determining a test result of the target signal line based on the target message includes: Parsing the target message to determine the target baud rate of the target message; In response to the target baud rate being consistent with a preset baud rate corresponding to the target signal line, determining that the test result is that no communication failure occurs in the target signal line; In response to the target baud rate being inconsistent with a preset baud rate corresponding to the target signal line, it is determined that the test result is that a communication failure occurs on the target signal line.
4. The method according to claim 1, characterized in that Determining a test result of the target signal line based on the target message includes: Obtaining a preset message corresponding to the target signal line; In response to the target message being consistent with the preset message, determining that the test result is that no communication failure occurs on the target signal line; In response to the target message being inconsistent with the preset message, it is determined that the test result is that a communication failure occurs in the target signal line.
5. The method according to claim 1, characterized in that Before sending the wake-up signal to the domain controller via the controller area network bus, the method further includes: Determining a bus address of the domain controller; A wake-up signal is generated based on the bus address and a preset baud rate corresponding to the target message.
6. The method according to any one of claims 1 to 5, characterized in that Before determining the test result of the target signal line based on the target message, the method further includes: Parsing the target message to obtain a target timestamp of the target message, wherein the target timestamp is used to indicate the time when the domain controller sends the target message; Based on the target timestamp, determine the target reply time corresponding to the target message, wherein the target reply time is used to represent the time from when the domain controller sends the target message to when the host computer receives the target message; In response to the target response time being greater than the preset response time, determining that the target message is lost; In response to the target response time being less than or equal to the preset response time, determining the test result based on the target message.
7. A signal testing system for a domain controller, characterized in that: include: A domain controller, including multiple signal lines; A relay circuit, wherein a plurality of first ends of the relay circuit are respectively connected to the plurality of signal lines in a one-to-one correspondence; A host computer, wherein the input end of the host computer is connected to the second end of the relay circuit, and the output end of the host computer is connected to the domain controller via a controller area network bus, wherein the host computer is used to execute the method described in any one of claims 1 to 6.
8. The system according to claim 7, characterized in that The relay circuit comprises: A plurality of switches, wherein first ends of the plurality of switches are connected to the plurality of signal lines in a one-to-one correspondence, and second ends of the plurality of switches are connected to the input end of the host computer.
9. The system according to claim 7, characterized in that The system further comprises: A first converter, wherein a first end of the first converter is connected to an output end of the host computer via a universal serial bus, and a second end of the first converter is connected to the domain controller via the controller area network bus.
10. The system according to claim 7, characterized in that The system further comprises: A second converter, wherein a first end of the second converter is connected to a second end of the relay circuit via a local interconnect network signal line, and a second end of the second converter is connected to the host computer via a universal serial bus.
11. A vehicle, characterized in that: include: A system as claimed in any one of claims 7 to 10.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is run, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.
13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
System for automatically testing automotive electronic controller on basis of CANoe
CN103592940A
Controller test method and device, vehicle and computer readable storage medium
CN114942623A
Test system
CN115981267A
Automatic driving domain controller test method and device, equipment and storage medium
CN116483048A
CANoe-based domain controller function test method and device
CN116909250A
Cited By
Test system and test method
CN119882686A
