Central control soft switch test method, device, equipment and storage medium
By obtaining the service interface code of the body domain controller, establishing a connection and generating a test script, and sending a call command to the body domain controller, it solves the problem that the central control soft switch cannot effectively control the body domain, and realizes the body domain and cockpit domain Joint commissioning and testing ensures a safe experience for users.
Patent Information
- Application Number
- CN202310004820.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-03
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2043-01-03
Smart Images

Figure CN116027764B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automobile testing, and in particular to a central control soft switch testing method, device, equipment and storage medium. Background Art
[0002] With the continuous development of the automobile industry, the number of automobile parts is increasing, and the functions they carry are becoming more and more diverse, which greatly improves the user experience. As a result, the electronic and electrical hardware and software configured in the whole vehicle are becoming more and more complex. In the service-oriented architecture (SOA) automobile architecture, the body domain provides service interfaces to the outside, and other domains obtain body domain-related functions by calling the body domain service interface. Among them, the body domain and the cockpit domain communicate through Ethernet. The data distribution service (DDS) middleware is used for Ethernet communication, which can not only meet the needs of large data transmission in the intelligent driving domain of automobiles, but also meet the SOA architecture. The central control soft switch is the cockpit domain calling the scene service of the body domain through DDS to realize the control of the body domain, such as the central control soft switch to control the headlights, wipers, etc.
[0003] However, when conducting a single test on the vehicle control, only the body domain controller is tested, and it is impossible to conduct a joint test with the cockpit domain. As a result, in actual operation, anomalies may occur when the central control soft switch calls the body domain scene service through DDS, and the body domain cannot be controlled. In order to ensure that the service interface provided by the body domain controller to the outside world can be used normally by the cockpit domain in the future, that is, the cockpit domain can call the body domain scene service through DDS, it is necessary to simulate the cockpit domain calling the body domain scene service to conduct a joint test of the body domain and the cockpit domain, that is, to test the central control soft switch. Summary of the invention
[0004] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to provide a central control soft switch testing method, device, equipment and storage medium, which are used to solve the technical problem that the service interface provided by the body domain controller to the outside can be used normally by the cockpit domain later, that is, the central control soft switch can control the body domain.
[0005] In view of the above problems, the present invention provides a central control soft switch testing method, the method comprising:
[0006] Obtain the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface;
[0007] Establishing a connection with the vehicle body domain controller through the service interface code;
[0008] Generate a target test script from the service interface code, wherein the service interface code carries the function code of each function module controlled by the vehicle body domain controller, so that the generated target test script represents the test of the target functional device;
[0009] Based on the target test script, a call command is sent to the vehicle body domain controller, so that the target functional device responds to the call command to complete the test of the central control soft switch.
[0010] In one embodiment of the present invention, the calling command is a target test script, a target function service interface name, request parameters, service type, interval time and number of calls, wherein the request parameters represent the test method for the specific function of the target function device, and the interval time and number of calls represent the frequency with which the test computer sends the calling command.
[0011] In one embodiment of the present invention, before sending a call command to the vehicle body domain controller based on the target test script, the method further includes:
[0012] Open the network packet analysis software so that the network packet analysis software can capture the data messages sent and received between the test computer and the vehicle body domain controller during the process of calling the target functional device.
[0013] In one embodiment of the present invention, the target functional device responds to the call command to complete the test of the central control soft switch, including:
[0014] The load box is connected to the pin interface of the vehicle body domain controller, an indicator light is installed on the box, and the output pin of the vehicle body domain controller is displayed by the indicator light;
[0015] If the indicator light is on, the call to the target functional device is successful, and the test result of the central control soft switch is normal; if the indicator light is not on, the call to the target functional device fails, and the test result of the central control soft switch is abnormal.
[0016] In one embodiment of the present invention, if the indicator light is not lit, the call to the target functional device fails, and the test result of the central control soft switch is abnormal, the method further includes:
[0017] Acquire the target data message sent and received between the test computer and the vehicle body domain controller captured by the network packet analysis software in the process of calling the target functional device;
[0018] Filtering the first data message representing the target functional device in the target data message according to the hash value to obtain a second data message, wherein the filtering command is the rtps contains interface hash value;
[0019] Processing the second data message to obtain a request data message for the test computer to call the target functional device and a response data message for the vehicle body domain controller to respond to the calling command;
[0020] The request data message and the response data message are analyzed to check whether the test computer has issued a request to call the target functional device and whether the body domain controller responds to the call command, so as to obtain the abnormal reason why the test result of the central control soft switch is abnormal.
[0021] In one embodiment of the present invention, before obtaining the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface, the method further includes:
[0022] The ID number of the virtual machine local area network is configured so that the test computer can communicate with the vehicle body domain controller through the ID number of the virtual machine local area network.
[0023] In one embodiment of the present invention, before obtaining the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface, the method further includes:
[0024] Configuring the target Internet Protocol address of the test computer to be an Internet Protocol address in the same network segment as the vehicle body domain controller;
[0025] Confirm that the test computer can receive and send data messages with the vehicle body domain controller through the target Internet Protocol address.
[0026] In one embodiment of the present invention, the method further includes:
[0027] Build the central control soft switch test environment, which includes the test computer, the body domain controller and the load box. The test computer is connected to the body domain controller through a network cable, wherein the network cable needs to be connected to the fixed connection port between the body domain controller and the cockpit domain controller, and the load box is connected to the body domain controller through a wiring harness.
[0028] The present invention also provides a central control soft switch testing device, the device comprising:
[0029] A code acquisition module, used to acquire a service interface code of a vehicle body domain controller based on a data distribution service protocol service interface;
[0030] A connection establishment module, used to establish a connection with the vehicle body domain controller through the service interface code;
[0031] A test script generation module, used to generate a target test script from the service interface code, wherein the service interface code carries the function code of each function module controlled by the vehicle body domain controller, so that the generated target test script represents the test of the target functional device;
[0032] A call command sending module is used to send a call command to the vehicle body domain controller based on the target test script, so that the target functional device responds to the call command to complete the test of the central control soft switch.
[0033] An embodiment of the present invention further provides an electronic device, including a processor, a memory, and a communication bus;
[0034] The communication bus is used to connect the processor and the memory;
[0035] The processor is used to execute the computer program stored in the memory to implement the method as described in any one of the above embodiments.
[0036] An embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored. The computer program is used to enable the computer to execute the method as described in any one of the above embodiments.
[0037] As described above, the central control soft switch testing method, device, equipment and storage medium provided by the embodiments of the present invention have the following beneficial effects:
[0038] The method obtains the service interface code of the body domain controller based on the data distribution service protocol service interface, so that the test computer establishes a connection with the body domain controller through the service interface code it obtains, and then generates a target test script from the service interface code, wherein the service interface code carries the function code of each function module controlled by the body domain controller, so that the generated target test script can characterize the purpose of testing the target functional device, and finally based on the target test script, sends a call command to the body domain controller, so that the target functional device controlled by the body domain controller responds to the call command, and completes the test of the central control soft switch, thereby simulating the cockpit domain to call the body domain scene service, and performing joint debugging tests on the body domain and the cockpit domain, discovering the service problems of the body domain controller itself in advance, ensuring the safety of users in the process of using the vehicle and improving the user experience.
[0039] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0041] Figure 1 is a schematic diagram of an implementation environment of a central control soft switch test device in an embodiment of the present invention;
[0042] Figure 2 is a flow chart of a central control soft switch testing method in an embodiment of the present invention;
[0043] Figure 3 It is a schematic diagram of a page for data analysis of a central control soft switch test result in an embodiment of the present invention;
[0044] Figure 4 is a flowchart of a specific central control soft switch testing method in an embodiment of the present invention;
[0045] Figure 5 It is a structural schematic diagram of a central control soft switch testing device in an embodiment of the present invention;
[0046] Figure 6 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and sub-samples in the embodiments can be combined with each other without conflict.
[0048] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0049] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0050] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure 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 terms used in this way can be interchanged where appropriate, so that the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0051] Unless otherwise stated, the term "plurality" means two or more.
[0052] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0053] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0054] See also Figure 1 , Figure 1 FIG. 1 is a schematic diagram of an implementation environment of a central control soft switch test device according to an embodiment of the present invention. Figure 1As shown, the test computer terminal 101 is connected to the body domain controller 102 via a network cable, wherein the network cable is connected to the connection port for communication between the body domain controller 102 and the cockpit domain controller, and the load box 103 is connected to the body controller 102 via a wiring harness, wherein the load box 103 is connected to the pin interface of the body domain controller 102. In this schematic diagram, the test computer terminal 101 is used to simulate the cockpit domain central control display screen, mainly sending service call requests to the body domain controller 102, capturing communication data and data analysis, etc.; the body domain controller 102 mainly controls various body functions, such as the control of headlights, taillights, interior lights, door locks, windows, sunroofs, wipers, electric trunks, smart keys, air conditioners, antennas, gateway communications, etc. The body domain controller 102 provides a service interface to the outside, and other domains obtain the relevant functions controlled by the body domain controller 102 by calling the service interface of the body domain controller 102. The central control soft switch is used by the cockpit domain controller to call the relevant functions controlled by the body domain controller 102 to achieve control of the body domain, such as the central control soft switch controls the sunroof, wipers, etc.; the load box 103 is used to provide input to the input pins of the body domain controller 102, that is, to power the body domain controller 102, and at the same time, the output of the output pins of the body domain controller 102 is displayed through the indicator light it carries to indicate that the body domain controller 102 has output. When testing the central control soft switch, the test computer 101 simulates the central control soft switch as a service subscriber client to subscribe, and the body controller 102 acts as a service publisher server. Then, it is observed whether the indicator light of the load box 103 is lit, and it is determined whether the central control soft switch can effectively call the relevant functions controlled by the body domain controller 102 according to the status of the indicator light.
[0055] See also Figure 2 , Figure 2 is a flow chart of a central control soft switch testing method in an embodiment of the present invention. The method can be applied to Figure 1 The implementation environment shown is specifically executed by the associated parsing module in the implementation environment. It should be understood that the method can also be applied to other exemplary implementation environments and be specifically executed by devices in other implementation environments. This embodiment does not limit the implementation environment to which the method is applicable. To solve these problems, the embodiments of the present application respectively propose a central control soft switch test method, a central control soft switch test device, an electronic device, and a computer-readable storage medium. These embodiments will be described in detail below.
[0056] like Figure 2 As shown, in an exemplary embodiment, the central control soft switch test method includes at least steps S201 to S204, which are described in detail as follows:
[0057] Step S201, obtaining a service interface code of a vehicle body domain controller based on a data distribution service protocol service interface.
[0058] Among them, the service interface code is provided by the service developer based on the data distribution service protocol (DDS protocol). The DDS protocol is a distributed real-time communication middleware protocol that adopts a publish / subscribe architecture and emphasizes data-centricity. Data is identified by topic, so that publishers publish data according to topics and subscribers can subscribe to data according to topics of interest. It is suitable for the automotive field and can meet the needs of big data transmission in the automotive intelligent driving domain as well as the automotive SOA architecture. The computer test end serves as one end of the simulated cockpit domain controller calling the functional service controlled by the body domain controller. Therefore, it is necessary to obtain the service interface code of the body domain controller based on the data distribution service protocol service interface so that it can establish a connection with the body domain controller.
[0059] In some embodiments, before obtaining the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface, the method further includes:
[0060] Configure the ID number of the virtual machine LAN so that the test computer can communicate with the vehicle body domain controller through the ID number of the virtual machine LAN.
[0061] The vehicle body domain controller divides the virtual local area network (VLAN). The test computer needs to be configured with a VLAN ID to communicate with the vehicle body domain controller. If the computer has an Intel network card, the VLAN ID can be configured through the software Intel(R)PROSet Adapter Configuration Utility.
[0062] In some embodiments, before obtaining the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface, the method further includes:
[0063] Configure the target Internet Protocol address of the test computer to an Internet Protocol address in the same network segment as the vehicle body domain controller;
[0064] Confirm that the test computer can receive and send data messages with the vehicle body domain controller through the target Internet Protocol address.
[0065] When the target Internet Protocol address of the test computer is configured as an Internet Protocol address in the same network segment as the vehicle body domain controller, the test computer can receive and send data packets with the vehicle body domain controller through the target Internet Protocol address.
[0066] For example, the Internet Protocol address of the vehicle body domain controller is 172.16.6.5. At this time, the target Internet Protocol address of the test computer can be configured as an Internet Protocol address in the same network segment as the vehicle body domain controller, that is, 172.16.6.X, such as: 172.16.6.122.
[0067] Step S202, establishing a connection with the vehicle body domain controller through the service interface code.
[0068] After the test computer obtains the service interface code of the body domain controller based on the data distribution service protocol service interface, it can establish a connection with the body domain controller through the service interface code.
[0069] Step S203: Generate a target test script from the service interface code.
[0070] The service interface code carries the function codes of each function module controlled by the vehicle body domain controller, so that the generated target test script represents the test of the target functional device.
[0071] The service interface code includes the function codes of each function module controlled by the body domain controller. When the service interface code is generated into a target test script, the function codes of the function modules representing the target functional devices in the service interface code can be processed, so that the generated target test script can represent the purpose of testing the target functional devices.
[0072] Step S204: Based on the target test script, a call command is sent to the vehicle body domain controller, so that the target functional device responds to the call command to complete the test of the central control soft switch.
[0073] After the test computer obtains the target test script, it can send a call command to the body domain controller to call the target functional device based on the target test script, so that the target functional device controlled by the body domain controller can respond to the call command and complete the test of the central control soft switch.
[0074] In some embodiments, the format of the calling command is the target test script, the target function service interface name, the request parameters, the service type, the interval time and the number of calls, wherein the request parameters represent the testing method for the specific function of the target function device, and the interval time and the number of calls represent the frequency of the test computer sending the calling command.
[0075] For example, taking the headlight as an example, the calling command is test_client.exe Cnr_Light_RR_Turnon(1)method 1000 1, where test_client.exe represents the target test script, Cnr_Light_RR_Turnon represents the name of the headlight service interface, and the request parameter 1 in the brackets means turning on only the position light, but if it is 2, it means turning on both the low beam and the position light, and if it is 0, it means turning off the headlight. The above calling command means that the test computer calls the position light to the body domain controller to turn on the position light, and the test computer sends the calling command to the body domain controller once every 1000ms.
[0076] In some embodiments, before sending a call command to the vehicle body domain controller based on the target test script, the method further includes:
[0077] Open the network packet analysis software so that the network packet analysis software can capture the data messages sent and received between the test computer and the vehicle body domain controller during the process of calling the target functional device.
[0078] Before the test computer sends a call command to the body domain controller, the network packet analysis software on the test computer needs to be opened so that the network packet analysis software can capture the data messages sent and received between the test computer and the body domain controller during the process of the test computer calling the target functional device. When the test computer fails to call the target functional device, the reason for the call failure can be analyzed based on the data messages captured by the network packet analysis software.
[0079] In one embodiment, the target functional device completes the test of the central control soft switch in response to the call command, including:
[0080] The load box is connected to the pin interface of the vehicle body domain controller, an indicator light is installed on the box, and the output pin of the vehicle body domain controller is displayed through the indicator light;
[0081] If the indicator light is on, the call to the target functional device is successful, and the test result of the central control soft switch is normal; if the indicator light is not on, the call to the target functional device fails, and the test result of the central control soft switch is abnormal.
[0082] The target functional device responds to the calling command, and the result of the calling is reflected through the load box connected to the body domain controller. The load box is equipped with an indicator light, which can display the output pin of the body domain controller through the indicator light. When the indicator light is lit, it indicates that the calling of the target functional device is successful and the test result of the central control soft switch is normal; when the indicator light is not lit, it means that the calling of the target functional device has failed and the test result of the central control soft switch is abnormal.
[0083] In some embodiments, if the indicator light is not on, the call to the target functional device fails, and the test result of the central control soft switch is abnormal, the method further includes:
[0084] Obtain the target data packets sent and received between the test computer and the vehicle body domain controller captured by the network packet analysis software during the process of calling the target functional device;
[0085] Filtering a first data message representing a target functional device in a target data message according to a hash value to obtain a second data message, wherein the filtering command is an rtps contains interface hash value;
[0086] Processing the second data message to obtain a request data message for the test computer to call the target functional device and a response data message for the vehicle body domain controller to respond to the call command;
[0087] The request data message and the response data message are analyzed to check whether the test computer has issued a request to call the target functional device and whether the body domain controller responds to the call command, so as to obtain the abnormal reason why the test result of the central control soft switch is abnormal.
[0088] If the test result of the central control soft switch is abnormal, it is necessary to find out the cause of the abnormality, that is, from the target data message sent and received between the test computer and the body domain controller captured by the network packet analysis software during the process of calling the target functional device, the first data message representing the target functional device is filtered out through the hash value, wherein the format of the filtering command is rtps contains interface hash value. It should be understood that DDS services are transmitted through the real-time publish / subscribe protocol (Real-time Publish / Subscribe, RTPS), and each service interface has a unique hash value when defined. The first data message representing the target functional device can be filtered according to the hash value, and the remaining data message is the second data message. Then, the second data message is processed to obtain the request data message of the test computer calling the target functional device and the response data message of the body domain controller responding to the call command. The request data message and the response data message are analyzed to check whether the request of the test computer to call the target functional device is issued and whether the body domain controller responds to the call command, and finally locate the cause of the abnormal test result of the central control soft switch.
[0089] For example, let's continue to take the call of headlights as an example, where the headlight service interface is Cnr_Light_RR_Turnon, and its corresponding hash value is 63373313, which is converted to hexadecimal as 3C70001, and after big-endian conversion, it is 01:00:C7:03. According to the hash value, the first data message related to the headlight service can be filtered out in the target data message captured by the network packet analysis software. The filtering command is: rtps contains 01:00:C7:03. The remaining second data message includes a request data message carrying a request identifier indicating that the test computer side calls the target functional device, and a response data message carrying a reply identifier indicating that the test computer side calls the target functional device. Analyze the request data message and the response data message. In the request data message with the request identifier, first find the hash value of the headlight function service in the request data message. The request parameters are after the hash value. For example, the parameter 01 after the hash value 01:00:C7:03 is the request parameter, indicating a request to turn on the position light. In the response data message with the reply identifier, first find the hash value of the headlight function service in the response data message. The response parameters are after the hash value. For example, the parameter 00 after the hash value 01:00:C7:03 is the response parameter, indicating that the service request is successful. Other response parameters such as 1 indicate that the parameter is out of range; 2 indicates that the high priority is busy and does not respond to the current request; 3 indicates that it is already in the preset state; 4 indicates that the vehicle power gear does not meet the requirements, etc. Based on these parameters, the reason why the test result of the central control soft switch is abnormal can be specifically located. For details, please refer to Figure 3 , Figure 3 It is a schematic diagram of a page for data analysis of a central control soft switch test result in an embodiment of the present invention.
[0090] In some embodiments, the central control soft switch testing method further includes:
[0091] Build a central control soft switch test environment, which includes a test computer, a body domain controller, and a load box. The test computer and the body domain controller are connected via a network cable, where the network cable needs to be connected to the fixed connection port between the body domain controller and the cockpit domain controller. The load box and the body domain controller are connected via a harness. Figure 1 , a schematic diagram of an implementation environment of a central control soft switch testing device shown in an exemplary embodiment of the present application.
[0092] The central control soft switch test method provided in the above embodiment obtains the service interface code of the body domain controller based on the data distribution service protocol service interface, so that the test computer establishes a connection with the body domain controller through the service interface code it obtains, and then generates a target test script from the service interface code, wherein the service interface code carries the function code of each function module controlled by the body domain controller, so that the generated target test script can characterize the purpose of testing the target functional device, and finally, based on the target test script, sends a call command to the body domain controller, so that the target functional device controlled by the body domain controller responds to the call command, and completes the test of the central control soft switch, thereby simulating the cockpit domain calling the body domain scene service, and performing joint debugging tests on the body domain and the cockpit domain, discovering problems with the body domain controller's own services in advance, ensuring the safety of users during the use of the vehicle, and improving the user experience.
[0093] The following is a further exemplary description of the central control soft switch test method provided in the above embodiment through a specific embodiment. Figure 4 , Figure 4 FIG. 1 is a flow chart of a specific central control soft switch testing method in an embodiment of the present invention. Figure 4 As shown, in an exemplary embodiment, the specific central control soft switch method includes at least steps S401 to S409, which are described in detail as follows:
[0094] Step S401, building a test environment.
[0095] Among them, the central control soft switch test environment includes a test computer, a body domain controller and a load box. The test computer and the body domain controller are connected through a network cable. The network cable needs to be connected to the fixed connection port between the body domain controller and the cockpit domain controller. The load box and the body domain controller are connected through a wiring harness.
[0096] Step S402, configuring the test computer.
[0097] Specifically, it includes: configuring the ID number of the virtual machine LAN so that the test computer can communicate with the body domain controller through the ID number of the virtual machine LAN, and configuring the target Internet Protocol address of the test computer to be an Internet Protocol address in the same network segment as the body domain controller, so that the test computer can receive and send data messages with the body domain controller through the target Internet Protocol address.
[0098] Step S403, obtaining the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface.
[0099] Step S404: establishing a connection with the vehicle body domain controller through the service interface code.
[0100] Step S405: Generate a target test script from the service interface code.
[0101] The service interface code carries the function codes of each function module controlled by the vehicle body domain controller, so that the generated target test script represents the test of the target functional device.
[0102] Step S406, opening the network packet analysis software.
[0103] The network packet analysis software captures the data messages sent and received between the test computer and the vehicle body domain controller during the process of calling the target functional device.
[0104] Step S407, sending a call command to the vehicle body domain controller.
[0105] Among them, the format of the calling command is target test script_target function service interface name, request parameters, method interval time and number of calls, among which, the request parameters represent the test method for the specific function of the target function device, the interval time and number of calls represent the frequency of the test computer sending the calling command, and the test computer sends the calling command to the body domain controller so that the target function device responds to the calling command to complete the test of the central control soft switch.
[0106] Step S408, determining the test result of the central control soft switch according to whether the indicator light on the load box is lit.
[0107] When the indicator light is on, it indicates that the call to the target functional device is successful and the test result of the central control soft switch is normal; when the indicator light is not on, it indicates that the call to the target functional device fails and the test result of the central control soft switch is abnormal.
[0108] Step S409: If it is determined that the test result of the central control soft switch is abnormal, the abnormal reason why the test result of the central control soft switch is abnormal is analyzed.
[0109] The analysis method is to filter out the first data message representing the target functional device through the hash value from the target data message sent and received between the test computer and the body domain controller captured by the network packet analysis software during the process of calling the target functional device, wherein the filtering command is the rtps contains interface hash value; it should be understood that DDS services are transmitted through the Real-time Publish / Subscribe Protocol (RTPS), and each service interface has a unique hash value when defined, and can filter the first data message representing the target functional device according to the hash value. The remaining data message is the second data message, and then the second data message is processed to obtain the request data message of the test computer calling the target functional device and the response data message of the body domain controller responding to the calling command, analyze the request data message and the response data message, check whether the request of the test computer to call the target functional device is issued, and whether the body domain controller responds to the calling command, and finally locate the reason why the test result of the central control soft switch is abnormal.
[0110] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the structure of a central control soft switch test device according to an embodiment of the present invention. Figure 5 As shown, this embodiment provides an image association storage device 500, which includes:
[0111] The code acquisition module 501 is used to acquire the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface;
[0112] A connection establishment module 502 is used to establish a connection with a vehicle body domain controller through a service interface code;
[0113] The test script generation module 503 is used to generate a target test script from the service interface code, wherein the service interface code carries the function code of each function module controlled by the vehicle body domain controller, so that the generated target test script represents the test of the target functional device;
[0114] The call command sending module 504 is used to send a call command to the vehicle body domain controller based on the target test script, so that the target functional device responds to the call command to complete the test of the central control soft switch.
[0115] The central control soft switch test device provided by the embodiment of the present disclosure is adopted. By obtaining the service interface code of the body domain controller based on the data distribution service protocol service interface, the test computer establishes a connection with the body domain controller through the service interface code it obtains, and then generates a target test script from the service interface code, wherein the service interface code carries the function code of each function module controlled by the body domain controller, so that the generated target test script can characterize the purpose of testing the target functional device. Finally, based on the target test script, a call command is sent to the body domain controller, so that the target functional device controlled by the body domain controller responds to the call command, and the test of the central control soft switch is completed, thereby simulating the cockpit domain calling the body domain scene service, and performing joint debugging tests on the body domain and the cockpit domain, discovering problems with the body domain controller's own services in advance, ensuring the safety of users during the use of the vehicle, and improving the user experience.
[0116] See also Figure 6 , Figure 6 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 6 The computer system 600 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0117] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 602 or the program loaded from the storage part 608 to the random access memory (RAM) 603, such as executing the method in the above embodiment. In the RAM 603, various programs and data required for system operation are also stored. The CPU 601, ROM 602 and RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0118] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read therefrom is installed into the storage section 608 as needed.
[0119] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 609, and / or installed from a removable medium 611. When the computer program is executed by a central processing unit (CPU) 601, various functions defined in the system of the present application are executed.
[0120] It should be noted that the computer-readable medium shown in the embodiment of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. This propagated data signal can take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. A computer program contained on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0121] The embodiments of the present disclosure further provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, any one of the methods in the embodiments is implemented.
[0122] The computer-readable storage medium in the embodiments of the present disclosure can be understood by ordinary technicians in the field: all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to the computer program. The aforementioned computer program can be stored in a computer-readable storage medium. When the program is executed, the execution includes the steps of the above-mentioned method embodiments; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.
[0123] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run the computer program so that the electronic device executes each step of the above method.
[0124] In this embodiment, the memory may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0125] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0126] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of listings containing one or more associated ones. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0127] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0128] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be 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 sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other 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. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0129] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A central control soft switch testing method, characterized in that: Applied to testing a computer terminal, the method includes: Obtain the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface; Establishing a connection with the vehicle body domain controller through the service interface code; Generate a target test script from the service interface code, wherein the service interface code carries the function code of each function module controlled by the vehicle body domain controller, so that the generated target test script represents the test of the target functional device; Based on the target test script, sending a call command to the vehicle body domain controller, so that the target functional device responds to the call command to complete the test of the central control soft switch; The target functional device responds to the call command to complete the test of the central control soft switch, including: The load box is connected to the pin interface of the vehicle body domain controller, an indicator light is installed on the box, and the output pin of the vehicle body domain controller is displayed by the indicator light; If the indicator light is on, the call to the target functional device is successful, and the test result of the central control soft switch is normal; if the indicator light is not on, the call to the target functional device fails, and the test result of the central control soft switch is abnormal; The method also includes: building the central control soft switch test environment, the central control soft switch test environment includes the test computer end, the body domain controller and the load box, the test computer end is connected to the body domain controller through a network cable, wherein the network cable needs to be connected to the fixed connection port between the body domain controller and the cockpit domain controller, and the load box is connected to the body domain controller through a wiring harness.
2. The central control soft switch testing method according to claim 1, characterized in that: The calling command includes a target test script, a target function service interface name, request parameters, a service type, an interval time and a number of calls, wherein the request parameters represent a test method for a specific function of the target function device, and the interval time and the number of calls represent a frequency at which the test computer sends the calling command.
3. The central control soft switch testing method according to claim 1, characterized in that: Before sending a call command to the vehicle body domain controller based on the target test script, the method further includes: Open the network packet analysis software so that the network packet analysis software can capture the data messages sent and received between the test computer and the vehicle body domain controller during the process of calling the target functional device.
4. The central control soft switch testing method according to claim 1, characterized in that: If the indicator light is not lit, the call to the target functional device fails, and the test result of the central control soft switch is abnormal, the method further includes: Acquire target data messages sent and received between the test computer and the vehicle body domain controller captured by network packet analysis software during the process of calling the target functional device; Filtering the first data message representing the target functional device in the target data message according to the hash value to obtain a second data message, wherein the filtering command is the rtps contains interface hash value; Processing the second data message to obtain a request data message for the test computer to call the target functional device and a response data message for the vehicle body domain controller to respond to the calling command; The request data message and the response data message are analyzed to check whether the test computer has issued a request to call the target functional device and whether the body domain controller responds to the call command, so as to obtain the abnormal reason why the test result of the central control soft switch is abnormal.
5. The central control soft switch testing method according to claim 1, characterized in that: Before obtaining the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface, the method further includes: The ID number of the virtual machine local area network is configured so that the test computer can communicate with the vehicle body domain controller through the ID number of the virtual machine local area network.
6. The central control soft switch testing method according to claim 1, characterized in that: Before obtaining the service interface code of the vehicle body domain controller based on the data distribution service protocol service interface, the method further includes: Configuring the target Internet Protocol address of the test computer to be an Internet Protocol address in the same network segment as the vehicle body domain controller; Confirm that the test computer can receive and send data messages with the vehicle body domain controller through the target Internet Protocol address.
7. A central control soft switch test device, characterized in that: Using the central control soft switch testing method according to any one of claims 1 to 6, the device comprises: A code acquisition module, used to acquire a service interface code of a vehicle body domain controller based on a data distribution service protocol service interface; A connection establishment module, used to establish a connection with the vehicle body domain controller through the service interface code; A test script generation module, used to generate a target test script from the service interface code, wherein the service interface code carries the function code of each function module controlled by the vehicle body domain controller, so that the generated target test script represents the test of the target functional device; A calling command sending module is used to send a calling command to the vehicle body domain controller based on the target test script, so that the target functional device responds to the calling command to complete the test of the central control soft switch; the target functional device responds to the calling command to complete the test of the central control soft switch, including: the load box is connected to the pin interface of the vehicle body domain controller, an indicator light is installed on the box, and the output pin of the vehicle body domain controller is displayed by the indicator light; if the indicator light is lit, the calling of the target functional device is successful, and the test result of the central control soft switch is normal; if the indicator light is not lit, the calling of the target functional device fails, and the test result of the central control soft switch is abnormal; Test environment building module: used to build the central control soft switch test environment, the central control soft switch test environment includes the test computer end, the body domain controller and the load box, the test computer end is connected to the body domain controller through a network cable, wherein the network cable needs to be connected to the fixed connection port between the body domain controller and the cockpit domain controller, and the load box is connected to the body domain controller through a wiring harness.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the method as claimed in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
System and method for realizing software upgrading control for multiple electronic control units of automobile
CN110764804A
Map interest point information acquisition method and device, electronic equipment and storage medium
CN112101339A