CN116027764A - Method, device, equipment and storage medium for testing central control soft switch - Google Patents

Method, device, equipment and storage medium for testing central control soft switch Download PDF

Info

Publication number
CN116027764A
CN116027764A CN202310004820.7A CN202310004820A CN116027764A CN 116027764 A CN116027764 A CN 116027764A CN 202310004820 A CN202310004820 A CN 202310004820A CN 116027764 A CN116027764 A CN 116027764A
Authority
CN
China
Prior art keywords
domain controller
vehicle body
body domain
test
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310004820.7A
Other languages
Chinese (zh)
Inventor
宗会
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing Changan Automobile Co Ltd
Original Assignee
Chongqing Changan Automobile Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing Changan Automobile Co Ltd filed Critical Chongqing Changan Automobile Co Ltd
Priority to CN202310004820.7A priority Critical patent/CN116027764A/en
Publication of CN116027764A publication Critical patent/CN116027764A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The method comprises the steps of obtaining a service interface code of a service interface of a vehicle body domain controller based on a data distribution service protocol, establishing connection with the vehicle body domain controller through the service interface code, and then generating a target test script by the service interface code, wherein the service interface code carries functional codes of all functional modules controlled by the vehicle body domain controller, so that the generated target test script characterizes the target functional device to test, finally, sending 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 center control soft switch, thereby achieving the purpose of simulating the call of the vehicle body domain scene service by a cabin domain, performing joint debugging test on the vehicle body domain and the cabin domain, finding the problem of the service of the vehicle body domain controller in advance, ensuring the safety of a user in the using process of the vehicle, and improving the experience of the user.

Description

Method, device, equipment and storage medium for testing central control soft switch
Technical Field
The present invention relates to the field of automobile testing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for testing a central control soft switch.
Background
With the continuous development of the automobile industry, the number of parts of the automobile is increased, the bearing functions are diversified, the experience of a user is greatly improved, and accordingly the electronic appliance software and hardware of the whole automobile configuration are also complicated. In an automobile architecture facing a service architecture (Service Oriented Architecture, SOA), a service interface is provided for an automobile body domain outwards, other domains acquire functions related to the automobile body domain by calling the automobile body domain service interface, wherein the automobile body domain and a cabin domain are communicated through an Ethernet, and a data distribution service (Data Distribution Service, DDS) middleware is adopted during Ethernet communication, so that the requirements of large data transmission of the intelligent driving domain of an automobile can be met, the SOA architecture can be met, and a central control soft switch is that the cabin domain calls scene services of the automobile body domain through the DDS, so that the automobile body domain is controlled, such as a central control soft switch control headlight, a windscreen wiper and the like.
However, when the vehicle control is subjected to the single test, only the test of the vehicle body domain controller is involved, and the joint debugging test with the cabin domain cannot be performed, so that in actual operation, the central control soft switch possibly generates abnormality when the scene service of the vehicle body domain is called through the DDS, and the control of the vehicle body domain cannot be realized.
Disclosure of Invention
In view of the above-mentioned drawbacks of the prior art, the present invention aims to provide a method, an apparatus, a device and a storage medium for testing a central control soft switch, which are used for solving the technical problem that a service interface provided by a vehicle body domain controller to the outside can be normally used by a cabin domain in the later period, that is, the central control soft switch can control the vehicle body domain.
In view of the above problems, the present invention provides a method for testing a central control soft switch, the method comprising:
acquiring a service interface code of a vehicle body domain controller based on a data distribution service protocol service interface;
establishing connection with the vehicle body domain controller through the service interface code;
generating a target test script by the service interface code, wherein the service interface code carries functional codes of all functional modules controlled by the vehicle body domain controller, so that the generated target test script characterizes to test a target functional device;
and sending 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 finish the test of the central control soft switch.
In an embodiment of the present invention, the call command is a target test script, a target function service interface name, a request parameter, a service type, an interval time and a call number, where the request parameter characterizes a test method for a specific function of the target function device, and the interval time and the call number characterize a frequency of sending the call command by the test computer terminal.
In an embodiment of the present invention, before sending a call command to the body domain controller based on the target test script, the method further includes:
and opening network packet analysis software to enable the network packet analysis software to grab data messages sent and received between the test computer end and the vehicle body domain controller in the process of calling the target function device.
In an embodiment of the present invention, the target function device responding to the call command, completing the test of the central control soft switch includes:
the load box is connected with a pin interface of the vehicle body domain controller, an indicator lamp is arranged on the box body, and an output pin of the vehicle body domain controller is displayed through the indicator lamp;
if the indicator lamp is lightened, the target function device is successfully invoked, and the test result of the central control soft switch is normal; if the indicator light is not lightened, the calling of the target function device fails, and the test result of the central control soft switch is abnormal.
In an embodiment of the present invention, after the call to the target function device fails if the indicator light is not turned on and the test result of the central control soft switch is abnormal, the method further includes:
Acquiring target data messages sent and received between the test computer end and the vehicle body domain controller, wherein the test computer end is grabbed by the network packet analysis software in the process of calling the target function device;
filtering a first data message representing the target function device in the target data message according to a hash value to obtain a second data message, wherein a filtering command is a rtps contacts interface hash value;
processing the second data message to obtain a request data message for calling the target function device by the test computer end and a response data message for responding to the calling command by the vehicle body domain controller;
analyzing the request data message and the response data message, and checking whether a request for calling the target function device by a test computer end is sent and whether the vehicle body domain controller responds to the calling command, so that an abnormal reason that the test result of the central control soft switch is abnormal is obtained.
In an embodiment of the present invention, before acquiring the service interface code of the service interface of the vehicle body domain controller based on the data distribution service protocol, the method further includes:
and configuring an ID number of a virtual machine local area network so that the test computer end can communicate with the vehicle body domain controller through the ID number of the virtual machine local area network.
In an embodiment of the present invention, before acquiring the service interface code of the service interface of the vehicle body domain controller based on the data distribution service protocol, the method further includes:
configuring a target internet protocol address of the test computer end as an internet protocol address of the same network segment with the vehicle body domain controller;
and confirming that the test computer end can receive and transmit data messages through the target internet protocol address and the vehicle body domain controller.
In an embodiment of the present invention, the method further includes:
the method comprises the steps of building a central control soft switch testing environment, wherein the central control soft switch testing environment comprises a testing computer end, a car body domain controller and a load box, the testing computer end is connected with the car body domain controller through a network cable, the network cable is required to be connected to a connecting port fixed between the car body domain controller and a cabin domain controller, and the load box is connected with the car body domain controller through a wire harness.
The invention also provides a device for testing the central control soft switch, which comprises:
the code acquisition module is used for acquiring a service interface code of the vehicle body domain controller based on a data distribution service protocol service interface;
The connection establishment module is used for establishing connection with the vehicle body domain controller through the service interface code;
the test script generation module is used for generating the service interface code into a target test script, wherein the service interface code carries functional codes of all functional modules controlled by the vehicle body domain controller, so that the generated target test script characterizes to test a target functional device;
and the calling command sending module is used for sending 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 embodiment of the invention also provides electronic equipment, which comprises a processor, a memory and a communication bus;
the communication bus is used for connecting the processor and the memory;
the processor is configured to execute a computer program stored in the memory to implement the method according to any one of the embodiments described above.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program for causing the computer to perform the method according to any of the above embodiments.
As described above, the method, the device, the equipment and the storage medium for testing the central control soft switch provided by the embodiment of the invention have the following beneficial effects:
according to the method, a service interface code of a service interface of a vehicle body domain controller based on a data distribution service protocol is acquired, a test computer end is connected with the vehicle body domain controller through the acquired service interface code, then the service interface code is used for generating a target test script, the service interface code carries functional codes of all functional modules controlled by the vehicle body domain controller, so that the generated target test script can represent the purpose of testing a target functional device, finally, a calling command is sent to the vehicle body domain controller based on the target test script, so that the target functional device controlled by the vehicle body domain controller responds to the calling command to complete the test of a central control soft switch, the purpose of simulating a cabin domain to call a vehicle body domain scene service, performing joint debugging test on the vehicle body domain and the cabin domain is achieved, the problem of service of the vehicle body domain controller is found in advance, and the safety of a user in the vehicle using process is guaranteed, and the experience of the user is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is apparent that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art. In the drawings:
FIG. 1 is a schematic diagram of an embodiment of a testing device for a central control soft switch according to the present invention;
FIG. 2 is a flow chart of a method for testing a central control soft switch according to an embodiment of the invention;
FIG. 3 is a schematic diagram of a page of data analysis of a test result of a central control soft switch according to an embodiment of the present invention;
FIG. 4 is a flow chart of a specific method for testing a central control soft switch according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a testing device for a central control soft switch according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
Other advantages and effects of the present invention will become apparent to those skilled in the art from the following disclosure, which describes the embodiments of the present invention with reference to specific examples. The invention may be practiced or carried out in other embodiments that depart from the specific details, and the details of the present description may be modified or varied from the spirit and scope of the present invention. It should be noted that, without conflict, the following embodiments and sub-samples in the embodiments may be combined with each other.
It should be noted that the illustrations provided in the following embodiments merely illustrate the basic concept of the present invention by way of illustration, and only the components related to the present invention are shown in the drawings and are not drawn according to the number, shape and size of the components in actual implementation, and the form, number and proportion of the components in actual implementation may be arbitrarily changed, and the layout of the components may be more complicated.
In the following description, numerous details are set forth in order to provide a more thorough explanation of embodiments of the present invention, it will be apparent, however, to one skilled in the art that embodiments of the present invention may be practiced without these specific details, in other embodiments, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the embodiments of the present invention.
The terms first, second and the like in the description and in the claims of the embodiments of the disclosure and in the above-described figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe embodiments of the present disclosure. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion.
The term "plurality" means two or more, unless otherwise indicated.
In the embodiment of the present disclosure, the character "/" indicates that the front and rear objects are an or relationship. For example, A/B represents: a or B.
The term "and/or" is an associative relationship that describes an object, meaning that there may be three relationships. For example, a and/or B, represent: a or B, or, A and B.
Referring to fig. 1, fig. 1 is a schematic view of an implementation environment of a central control soft switch testing device in an embodiment of the present invention, as shown in fig. 1, a testing computer end 101 is connected to a car body domain controller 102 through a network cable, wherein the network cable is connected to a connection port of the car body domain controller 102 for communication with a cabin domain controller, a load box 103 is connected to the car body controller 102 through a wire harness, and the load box 103 is connected to a pin interface of the car body domain controller 102. In the schematic diagram, a test computer end 101 is used for simulating a cabin domain control display screen, and mainly sends a service call request, communication data capture, data analysis and the like to a vehicle body domain controller 102; the car body domain controller 102 mainly controls various car body functions, such as controlling a headlight, a car rear light, an interior light, a car door lock, a car window, a skylight, a windscreen wiper, an electric trunk, an intelligent key, an air conditioner, an antenna, gateway communication and the like, the car body domain controller 102 provides a service interface outwards, other domains acquire related functions controlled by the car body domain controller 102 by calling the service interface of the car body domain controller 102, and the central control soft switch is used for calling the related functions controlled by the car body domain controller 102 by the cabin domain controller to realize the control of the car body domain, such as controlling the skylight, the windscreen wiper and the like by the central control soft switch; the load box 103 is used for providing input to the input pins of the body domain controller 102, namely, supplying power to the body domain controller 102, and displaying the output of the output pins of the body domain controller 102 through the indicator lights carried by the output pins to indicate that the body domain controller 102 has output. When the central control soft switch test is performed, the test computer end 101 simulates the central control soft switch to be subscribed as a service subscriber client end, the vehicle body controller 102 is used as a service publisher server end, then whether the indicator lamp of the load box 103 is lighted or not is observed, and whether the central control soft switch can effectively call related functions controlled by the vehicle body domain controller 102 is judged according to the state of the indicator lamp.
Referring to fig. 2, fig. 2 is a flow chart of a method for testing a central control soft switch according to an embodiment of the invention. The method can be applied to the implementation environment shown in fig. 1, and is specifically executed by the association analysis module in the implementation environment. It should be understood that the method may be adapted to other exemplary implementation environments and be specifically executed by devices in other implementation environments, and the implementation environments to which the method is adapted are not limited by the present embodiment. To solve these problems, embodiments of the present application respectively propose a method for testing a central control soft switch, a device for testing a central control soft switch, an electronic device, and a computer readable storage medium, and these embodiments will be described in detail below.
As shown in fig. 2, in an exemplary embodiment, the method for testing a central control soft switch at least includes steps S201 to S204, which are described in detail as follows:
step S201, a service interface code of the vehicle body domain controller based on the data distribution service protocol service interface is acquired.
The service interface code is provided by a service developer based on a data distribution service protocol (DDS protocol), the DDS protocol is a distributed real-time communication middleware protocol, a publishing/subscribing system architecture is adopted, data is emphasized to be used as a center, the data is marked through topic, so that the publisher publishes the data according to a theme, the subscriber can subscribe the data according to the theme of interest, the service interface code is suitable for the automobile field, the requirement of big data transmission of the intelligent driving field of the automobile can be met, the automobile SOA architecture can also be met, and a computer test end is used as one end of a function service controlled by a simulation cabin domain controller calling an automobile body domain controller, so that the service interface code of the automobile body domain controller based on a service interface of the data distribution service protocol needs to be acquired, and the connection between the automobile body domain controller and the automobile body domain controller can be established.
In some embodiments, prior to obtaining the service interface code of the vehicle body domain controller service interface based on the data distribution service protocol, the method further comprises:
the ID number of the virtual machine local area network is configured so that the test computer end can communicate with the vehicle body domain controller through the ID number of the virtual machine local area network.
The vehicle body domain controller divides a virtual machine local area network (Virtual Local Area Network, VLAN), the test computer needs to be configured with 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 software Intel (R) PROSet Adapter Configuration Utility.
In some embodiments, prior to obtaining the service interface code of the vehicle body domain controller service interface based on the data distribution service protocol, the method further comprises:
configuring a target internet protocol address of a test computer end as an internet protocol address of the same network segment with the vehicle body domain controller;
the confirmation test computer end can receive and transmit the data message through the target internet protocol address and the vehicle body domain controller.
After the target internet protocol address of the test computer end is configured to be the internet protocol address of the same network segment as the vehicle body domain controller, the test computer end can mutually receive and send data packets through the target internet protocol address and the vehicle body domain controller.
For example, the internet protocol address of the body domain controller is 172.16.6.5, and at this time, the target internet protocol address of the test computer end may be configured as the internet protocol address of the same network segment as the body domain controller, namely 172.16.6.X, such as: 172.16.6.122.
step S202, connection is established with a vehicle body domain controller through a service interface code.
After the test computer end obtains the service interface code of the service interface of the vehicle body domain controller based on the data distribution service protocol, connection can be established between the service interface code and the vehicle body domain controller.
Step S203, the service interface code is used for generating a target test script.
The service interface codes carry functional codes of all functional modules controlled by the vehicle body domain controller, so that the generated target test script characterizes the test of the target functional device.
The service interface code comprises the function codes of all the function modules controlled by the vehicle body domain controller, and when the service interface code is used for generating a target test script, the function codes which are expressed by the function modules of the target function device in the service interface code can be processed, so that the generated target test script can express the aim of testing the target function device.
And step S204, based on the target test script, a calling command is sent to the vehicle body domain controller, so that the target functional device responds to the calling command to complete the test of the central control soft switch.
After the test computer end obtains the target test script, the target test script can be based on the target test script to send a call command for calling the target function device to the vehicle body domain controller, so that the target function device controlled by the vehicle body domain controller can respond to the call command to complete the test of the central control soft switch.
In some embodiments, the format of the call command is a target test script, a target function service interface name, a request parameter, a service type, an interval time and a call number, where the request parameter characterizes a test method for a specific function of the target function device, and the interval time and the call number characterize a frequency of sending the call command by the test computer terminal.
For example, taking a headlight as an example, the call command is test_client_ Cnr _light_rr_turn (1) method 1000 1, where test_client_exe represents a target test script, cnr _light_rr_turn represents a headlight service interface name, the request parameter 1 in the bracket represents that only the position Light is turned on, but if 2 represents that both the near Light and the position Light are turned on, and if 0 represents that the headlight is turned off, the above call command means that the test computer side calls the position Light to the body domain controller, turns on the position Light, and the test computer side sends the call command to the body domain controller at a frequency of 1000ms once.
In some embodiments, before sending the call command to the body domain controller based on the target test script, the method further comprises:
and opening the network packet analysis software to enable the network packet analysis software to grab the data messages sent and received between the test computer end and the vehicle body domain controller in the process of calling the target functional device.
Before the test computer end sends a call command to the vehicle body domain controller, the network packet analysis software of the test computer end needs to be opened, so that the network packet analysis software can grasp data messages sent and received between the test computer end and the vehicle body domain controller in the process of calling the target function device by the test computer end, and when the test computer end fails to call the target function device, the reason of the call failure can be analyzed based on the data messages grasped by the network packet analysis software.
In one embodiment, the target function device responds to the call command to complete the test of the central control soft switch, which comprises the following steps:
the load box is connected with a pin interface of the vehicle body domain controller, an indicator lamp is arranged on the box body, and an output pin of the vehicle body domain controller is displayed through the indicator lamp;
if the indicator light is lightened, the target function device is successfully invoked, and the test result of the central control soft switch is normal; if the indicator light is not lightened, the calling of the target function device fails, and the test result of the central control soft switch is abnormal.
The target function device responds to the calling command, the called result is reacted through a load box connected with the vehicle body domain controller, an indicator lamp is arranged on the load box, the output pin of the vehicle body domain controller can be displayed through the indicator lamp, when the indicator lamp is lightened, the successful calling of the target function device is indicated, and the test result of the central control soft switch is normal; when the indicator light is not lightened, the calling of the surface to the target functional device fails, and the test result of the central control soft switch is abnormal.
In some embodiments, after the call to the target function device fails if the indicator light is not turned on and the test result of the central control soft switch is abnormal, the method further includes:
acquiring target data messages sent and received between a test computer end and a vehicle body domain controller, wherein the test computer end is grabbed by network packet analysis software in the process of calling target function devices;
filtering a first data message representing a target function device in a target data message according to a hash value to obtain a second data message, wherein a filtering command is a rtps contacts interface hash value;
processing the second data message to obtain a request data message for calling the target function device by the test computer end and a response data message for responding to the calling command by the vehicle body domain controller;
Analyzing the request data message and the response data message, and checking whether a request for calling the target function device by the test computer end is sent out or not and whether the vehicle body domain controller responds to the calling command or not, so that an abnormal reason that the test result of the central control soft switch is abnormal is obtained.
If the test result of the central control soft switch is abnormal, the reason for the abnormality is required to be found, namely, in the process of calling the target function device from the network packet analysis software, the captured target data message is sent and received between the test computer end and the vehicle body domain controller, the first data message representing the target function device is filtered through a hash value, wherein the format of a filtering command is a RTPS contact interface hash value, it should be understood that the DDS service is transmitted through Real-time publishing/subscore (RTPS), each service interface has a unique hash value when defined, the first data message representing the target function device can be filtered according to the hash value, the remaining data message is a second data message, then the second data message is processed, the request data message of calling the target function device by the test computer end and the response data message of the vehicle body domain controller responding to the calling command are obtained, whether the request data message and the response data message are transmitted in Real time, whether the test function device is called by the main control device is the abnormal or not is judged, and whether the reason of the soft control device is called by the final.
For example, taking a headlight as an example, the headlight service interface is Cnr _light_rr_turnon, the corresponding hash value is 63373313, the hexadecimal is converted into 3C70001, the size end is converted into 01:00:c7:03, the first data message related to the headlight service can be filtered out from the target data message captured by the network packet analysis software according to the hash value, and the filtering command is: rtps contacts 01:00:C7:03, and the rest second data message comprises a request data message carrying a request identifier and representing that the test computer terminal calls the target function device, and a response data message carrying a reply identifier and representing that the test computer terminal calls the target function device. Analyzing the request data message and the response data message, in the request data message carrying the request identification, firstly finding a hash value of the headlight function service in the request data message, wherein a request parameter is behind the hash value, for example, a parameter 01 behind the hash value 01:00:C7:03 is the request parameter, and the request is indicated to turn on a position lamp; in a response data message carrying a reply identifier, firstly, a hash value of the headlight function service is found in the response data message, a response parameter is behind the hash value, for example, a parameter 00 behind the hash value 01:00:C7:03 is the response parameter, the success of the service request is indicated, and other response parameters such as 1 indicate that the parameters are out of range; 2 indicates that the high priority is busy and does not respond to the current request; 3 represents a preset state; and 4, indicating that the gear of the whole vehicle power supply does not meet the requirements, and the like, and according to the parameters, the test result of the central control soft switch can be specifically positioned to be the cause of abnormality. Referring specifically to fig. 3, fig. 3 is a schematic page diagram of data analysis of a test result of a central control soft switch according to an embodiment of the present invention.
In some embodiments, the method for testing a central control soft switch further comprises:
the method comprises the steps of building a central control soft switch testing environment, wherein the central control soft switch testing environment comprises a testing computer end, a vehicle body domain controller and a load box, the testing computer end is connected with the vehicle body domain controller through a network cable, the network cable is required to be connected to a connecting port fixed between the vehicle body domain controller and a cabin domain controller, and the load box is connected with the vehicle body domain controller through a wire harness. The test environment of the central control soft switch can be seen in fig. 1, and an exemplary embodiment of the present application shows a schematic diagram of an implementation environment of the central control soft switch test device.
According to the method for testing the central control soft switch, the service interface code of the service interface of the vehicle body domain controller based on the data distribution service protocol is obtained, the test computer end is connected with the vehicle body domain controller through the obtained service interface code, then the service interface code is used for generating the target test script, the service interface code carries the function codes of all the function modules controlled by the vehicle body domain controller, so that the generated target test script can represent the purpose of testing the target function device, finally, a calling command is sent to the vehicle body domain controller based on the target test script, so that the target function device controlled by the vehicle body domain controller responds to the calling command to complete the testing of the central control soft switch, the purposes of simulating the cabin domain to call the vehicle body domain scene service, performing joint debugging test on the vehicle body domain and the cabin domain are achieved, the service problem of the vehicle body domain controller is found in advance, and the safety of a user in the vehicle using process is guaranteed, and the experience of the user is improved.
The following describes a further exemplary embodiment of the method for testing a central control soft switch according to the embodiment of the present invention, please refer to fig. 4, fig. 4 is a schematic flow chart of a specific method for testing a central control soft switch according to an embodiment of the present invention. As shown in fig. 4, in an exemplary embodiment, the specific method for central soft switching at least includes steps S401 to S409, which are described in detail below:
step S401, building a test environment.
The central control soft switch testing environment comprises a testing computer end, a vehicle body domain controller and a load box, wherein the testing computer end is connected with the vehicle body domain controller through a network cable, the network cable is required to be connected to a connecting port fixed between the vehicle body domain controller and the cabin domain controller, and the load box is connected with the vehicle body domain controller through a wire harness.
Step S402, a test computer is configured.
The method specifically comprises the following steps: the ID number of the virtual machine local area network is configured so that the test computer end can communicate with the vehicle body domain controller through the ID number of the virtual machine local area network, and the target Internet protocol address of the test computer end is configured to be the Internet protocol address of the same network segment with the vehicle body domain controller, so that the test computer end can receive and transmit data messages through the target Internet protocol address and the vehicle body domain controller.
Step S403, a service interface code of the vehicle body domain controller based on the data distribution service protocol service interface is acquired.
And step S404, establishing connection with the vehicle body domain controller through the service interface code.
Step S405, generating a target test script from the service interface code.
The service interface codes carry functional codes of all functional modules controlled by the vehicle body domain controller, so that the generated target test script characterizes the test of the target functional device.
In step S406, the network packet analysis software is opened.
The network packet analysis software grabs the data messages sent and received between the test computer end and the vehicle body domain controller in the process of calling the target function device.
Step S407, a call command is sent to the body domain controller.
The method comprises the steps of determining a calling command, wherein the calling command is in a format of a target test script_target function service interface name, a request parameter, a method interval time and calling times, wherein the request parameter represents a test method of a specific function of a target function device, the interval time and the calling times represent the frequency of sending the calling command by a test computer end, and the test computer end sends the calling command to a vehicle body domain controller so that the target function device responds to the calling command to complete the test of a central control soft switch.
Step S408, determining a test result of the central control soft switch according to whether the indicator light on the load box is lightened.
When the indicator light is lightened, the successful calling of the target functional device is indicated, and the test result of the central control soft switch is normal; when the indicator light is not lightened, the calling of the surface to the target functional device fails, and the test result of the central control soft switch is abnormal.
Step S409, if it is determined that the test result of the central control soft switch is abnormal, analyzing the abnormality cause of the test result of the central control soft switch.
The analysis method is that in the process of calling the target function device from the network packet analysis software, the first data message representing the target function device is filtered out through a hash value in target data messages sent and received between the grabbed test computer end and the vehicle body domain controller, wherein the filtering command is a rtps contacts interface hash value; it should be understood that the DDS service is transmitted through Real-time Publish/Subscribe (RTPS), each service interface has a unique hash value when defined, and can filter a first data message representing a target function device according to the hash value, the remaining data messages are second data messages, and then process the second data messages, so as to obtain a request data message of a test computer terminal for calling the target function device and a response data message of a vehicle body domain controller for responding to a call command, analyze the request data message and the response data message, check whether a request of the test computer terminal for calling the target function device is sent, and whether the vehicle body domain controller responds to the call command, and finally determine that a test result of the soft switch is an abnormal cause.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a central control soft switch testing device according to an embodiment of the present invention, as shown in fig. 5, the embodiment provides an image association storage device 500, which includes:
a code obtaining module 501, configured to obtain a service interface code of a service interface of the vehicle body domain controller based on a data distribution service protocol;
the connection establishment module 502 is configured to establish connection with the vehicle body domain controller through a service interface code;
a test script generating module 503, configured to generate a service interface code into a target test script, where the service interface code carries functional codes of each functional module controlled by the vehicle body domain controller, so that the generated target test script characterizes to test a target functional device;
and the call command sending module 504 is configured 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.
According to the central control soft switch testing device provided by the embodiment of the disclosure, the service interface code of the service interface of the vehicle body domain controller based on the data distribution service protocol is acquired, the test computer end is connected with the vehicle body domain controller through the acquired service interface code, then the service interface code is used for generating the target testing script, wherein the service interface code carries the function codes of all function modules controlled by the vehicle body domain controller, so that the generated target testing script can represent the purpose of testing a target function device, finally, a calling command is sent to the vehicle body domain controller based on the target testing script, so that the target function device controlled by the vehicle body domain controller responds to the calling command to complete the testing of the central control soft switch, the purposes of simulating the calling of the vehicle body domain scene service of a cabin domain, performing joint debugging test on the vehicle body domain and the cabin domain are achieved, the service problem of the vehicle body domain controller is found in advance, and the safety of a user in the vehicle using process is ensured, and the experience of the user is improved.
Referring to fig. 6, fig. 6 shows a schematic diagram of a computer system suitable for use in implementing the electronic device of the embodiments of the present application. It should be noted that, the computer system 600 of the electronic device shown in fig. 6 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 6, the computer system 600 includes a central processing unit (Central Processing Unit, CPU) 601, which can perform various appropriate actions and processes, such as performing the methods in the above-described embodiments, according to a program stored in a Read-Only Memory (ROM) 602 or a program loaded from a storage section 608 into a random access Memory (Random Access Memory, RAM) 603. 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 bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, mouse, etc.; an output portion 607 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and a speaker, etc.; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The drive 610 is also connected to the I/O interface 605 as needed. Removable media 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on drive 610 so that a computer program read therefrom is installed as needed into storage section 608.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 609, and/or installed from the removable medium 611. When executed by a Central Processing Unit (CPU) 601, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with a computer-readable computer program embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied 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 foregoing.
The disclosed embodiments also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements any of the methods of the present embodiments.
The computer readable storage medium in the embodiments of the present disclosure may be understood by those of ordinary skill in the art: all or part of the steps for implementing the method embodiments described above may be performed by computer program related hardware. The aforementioned computer program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver, and a communication interface, where the memory and the communication interface are connected to the processor and the transceiver and perform communication therebetween, the memory is used to store a computer program, the communication interface is used to perform communication, and the processor and the transceiver are used to run the computer program, so that the electronic device performs each step of the above method.
In this embodiment, the memory may include a random access memory (Random Access Memory, abbreviated as RAM), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a graphics processor (Graphics Processing Unit, GPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The above description and the drawings illustrate embodiments of the disclosure sufficiently to enable those skilled in the art to practice them. Other embodiments may involve structural, logical, electrical, process, and other changes. The embodiments represent only possible variations. Individual components and functions are optional unless explicitly required, and the sequence of operations may vary. Portions and sub-samples of some embodiments may be included in or substituted for portions and sub-samples of other embodiments. Moreover, the terminology used in the present application is for the purpose of describing embodiments only and is not intended to limit the claims. As used in the description of the embodiments and the claims, the singular forms "a," "an," and "the" (the) are intended to include the plural forms as well, unless the context clearly indicates otherwise. Similarly, the term "and/or" as used in this application is meant to encompass any and all possible combinations of one or more of the associated listed. In addition, when used in this application, the terms "comprises," "comprising," and/or "includes," and variations thereof, mean the presence of the stated sub-sample, integer, step, operation, element, and/or component, but do not exclude the presence or addition of one or more other sub-samples, integers, steps, operations, elements, components, and/or groups of these. Without further limitation, an element defined by the phrase "comprising one …" does not exclude the presence of other like elements in a process, method or apparatus comprising such elements. In this context, each embodiment may be described with emphasis on the differences from the other embodiments, and the same similar parts between the various embodiments may be referred to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method sections disclosed in the embodiments, the description of the method sections may be referred to for relevance.
Those of skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. The skilled person may use different methods for each particular application to achieve the described functionality, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In the embodiments disclosed herein, the disclosed methods, articles of manufacture (including but not limited to devices, apparatuses, etc.) may be practiced in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements may be merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some sub-samples may be omitted, or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form. The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to implement the present embodiment. In addition, each functional unit in the embodiments of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. In the description corresponding to the flowcharts and block diagrams in the figures, operations or steps corresponding to different blocks may also occur in different orders than that disclosed in the description, and sometimes no specific order exists between different operations or steps. For example, two consecutive operations or steps may actually be performed substantially in parallel, they may sometimes be performed in reverse order, which may be dependent on the functions involved. Each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

Claims (11)

1. The method is characterized by being applied to a test computer end, and comprises the following steps:
acquiring a service interface code of a vehicle body domain controller based on a data distribution service protocol service interface;
establishing connection with the vehicle body domain controller through the service interface code;
generating a target test script by the service interface code, wherein the service interface code carries functional codes of all functional modules controlled by the vehicle body domain controller, so that the generated target test script characterizes to test a target functional device;
and sending 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 finish the test of the central control soft switch.
2. The method for testing a central control soft switch according to claim 1, wherein the call command is a target test script, a target function service interface name, a request parameter, a service type, an interval time and a call number, wherein the request parameter characterizes a test method for a specific function of the target function device, and the interval time and the call number characterize a frequency of sending the call command by the test computer side.
3. The method of claim 1, further comprising, prior to sending a call command to the body domain controller based on the target test script:
and opening network packet analysis software to enable the network packet analysis software to grab data messages sent and received between the test computer end and the vehicle body domain controller in the process of calling the target function device.
4. The method of claim 1, wherein the target function device, in response to the call command, completes the testing of the central soft switch comprising:
the load box is connected with a pin interface of the vehicle body domain controller, an indicator lamp is arranged on the box body, and an output pin of the vehicle body domain controller is displayed through the indicator lamp;
if the indicator lamp is lightened, the target function device is successfully invoked, and the test result of the central control soft switch is normal; if the indicator light is not lightened, the calling of the target function device fails, and the test result of the central control soft switch is abnormal.
5. The method according to claim 4, wherein after the call to the target function device fails if the indicator light is not turned on and the test result of the central soft switch is abnormal, the method further comprises:
Acquiring target data messages sent and received between the test computer end and the vehicle body domain controller, wherein the test computer end is grabbed by the network packet analysis software in the process of calling the target function device;
filtering a first data message representing the target function device in the target data message according to a hash value to obtain a second data message, wherein a filtering command is a rtps contacts interface hash value;
processing the second data message to obtain a request data message for calling the target function device by the test computer end and a response data message for responding to the calling command by the vehicle body domain controller;
analyzing the request data message and the response data message, and checking whether a request for calling the target function device by a test computer end is sent and whether the vehicle body domain controller responds to the calling command, so that an abnormal reason that the test result of the central control soft switch is abnormal is obtained.
6. The method of claim 1, wherein prior to obtaining a service interface code of a service interface of a body domain controller based on a data distribution service protocol, the method further comprises:
And configuring an ID number of a virtual machine local area network so that the test computer end can communicate with the vehicle body domain controller through the ID number of the virtual machine local area network.
7. The method of claim 1, wherein prior to obtaining a service interface code of a service interface of a body domain controller based on a data distribution service protocol, the method further comprises:
configuring a target internet protocol address of the test computer end as an internet protocol address of the same network segment with the vehicle body domain controller;
and confirming that the test computer end can receive and transmit data messages through the target internet protocol address and the vehicle body domain controller.
8. The method of any one of claims 1-7, further comprising:
the method comprises the steps of building a central control soft switch testing environment, wherein the central control soft switch testing environment comprises a testing computer end, a car body domain controller and a load box, the testing computer end is connected with the car body domain controller through a network cable, the network cable is required to be connected to a connecting port fixed between the car body domain controller and a cabin domain controller, and the load box is connected with the car body domain controller through a wire harness.
9. A center-control soft switch testing apparatus, the apparatus comprising:
the code acquisition module is used for acquiring a service interface code of the vehicle body domain controller based on a data distribution service protocol service interface;
the connection establishment module is used for establishing connection with the vehicle body domain controller through the service interface code;
the test script generation module is used for generating the service interface code into a target test script, wherein the service interface code carries functional codes of all functional modules controlled by the vehicle body domain controller, so that the generated target test script characterizes to test a target functional device;
and the calling command sending module is used for sending 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.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the electronic device to implement the method of any of claims 1-8.
11. A computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor of a computer, cause the computer to perform the method of any of claims 1 to 8.
CN202310004820.7A 2023-01-03 2023-01-03 Method, device, equipment and storage medium for testing central control soft switch Pending CN116027764A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310004820.7A CN116027764A (en) 2023-01-03 2023-01-03 Method, device, equipment and storage medium for testing central control soft switch

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310004820.7A CN116027764A (en) 2023-01-03 2023-01-03 Method, device, equipment and storage medium for testing central control soft switch

Publications (1)

Publication Number Publication Date
CN116027764A true CN116027764A (en) 2023-04-28

Family

ID=86080842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310004820.7A Pending CN116027764A (en) 2023-01-03 2023-01-03 Method, device, equipment and storage medium for testing central control soft switch

Country Status (1)

Country Link
CN (1) CN116027764A (en)

Similar Documents

Publication Publication Date Title
CN111371638B (en) Intelligent equipment testing method and device, server and storage medium
CN109525461B (en) Network equipment testing method, device, equipment and storage medium
EP3761605B1 (en) Vehicle diagnosis method, related device and system
CN110855558B (en) Internet of vehicles gateway and CANoverTCP/IP protocol connection realization method, ECU and upgrading method
CN110120970B (en) Data processing method and device based on Internet of vehicles and gateway system
CN114629742B (en) Vehicle data communication simulation test platform and method for new energy electric vehicle
CN112492052A (en) Remote debugging method and device for intelligent networked vehicle data
CN112860559B (en) Upgrade test system and method
CN108134711B (en) Method for testing terminal APP, simulation household appliance system and storage medium
CN116027764A (en) Method, device, equipment and storage medium for testing central control soft switch
CN114253823A (en) Distributed test method and related equipment
CN113485920B (en) Method and device for realizing DoIP entity, readable storage medium and electronic equipment
WO2023039804A1 (en) Signal connection method, signal connection apparatus, and test system
CN111624983B (en) Synchronous connection method and vehicle remote diagnosis system
CN115795845A (en) Construction method, device, equipment and storage medium of integrated test simulation platform
CN115550498A (en) Screen projection method, device, equipment and storage medium
CN115562222A (en) Simulation test method, device, equipment and storage medium of vehicle data
CN114328229A (en) Over-the-air technology test system
CN107181644A (en) For the method and apparatus for the network performance for monitoring network application
CN116095117B (en) Vehicle-mounted terminal debugging method and device, electronic equipment and storage medium
CN116400845A (en) Multi-screen interaction method and device for intelligent assistant of automobile, electronic equipment and storage medium
CN214042112U (en) Upgrade test system
CN113452670B (en) Phishing blocking method, device, equipment and medium based on SDN network
CN115065624B (en) Communication test method and device, electronic equipment and storage medium
CN113655777B (en) Full-automatic scene test debugging device and method for rail transit vehicle

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination