Some / IP service testing system and method
By employing multi-threading in the SOME/IP service testing system, the problem of UI blocking on the host computer was solved, enabling efficient and convenient SOME/IP service testing. This allows for the discovery of issues during the single-item testing phase, reducing costs and improving user-friendliness.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- GUANGZHOU XIAOPENG MOTORS TECH CO LTD
- Filing Date
- 2024-09-20
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, the host computer UI is prone to operational blockage during SOME/IP service testing, especially when Ethernet data reception and SOME/IP message transmission are unpredictable and real-time data display is required, leading to frequent lag or even abnormal crashes of the host computer.
A SOME/IP service testing system is adopted, including a host computer, an Ethernet converter, and an in-vehicle controller. Through multi-threaded processing, modules with long processing/waiting times and high resource consumption are separated. The SOME/IP service in the in-vehicle controller is tested using service import thread, connection subscription thread, service request thread, receiving thread, and display thread, and test results are generated to determine whether there are any anomalies.
It enables timely detection of problems during the single-item testing phase, reduces testing costs, simplifies environment setup, improves test smoothness and user-friendliness, avoids UI interface blocking and crashes, and enhances the robustness of the testing system and ease of user operation.
Smart Images

Figure CN2024120162_15052026_PF_FP_ABST
Abstract
Description
SOME / IP Service Testing System and Methods
[0001] Priority information
[0002] This application claims priority and benefit to patent application No. 202311382448X, filed with the China National Intellectual Property Administration on October 23, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of vehicle controller testing technology, and in particular to a SOME / IP service testing system and method. Background Technology
[0004] The current mainstream testing method for SOME / IP (Scalable service-oriented middleware over IP) services in the vehicle controller (ECU) under the automotive SOA (Service-Oriented Architecture) architecture generally uses a conventional host computer UI (User Interface) to simulate a SOME / IP client to achieve basic functions, while data transmission and processing are handled by the host computer. However, due to the unpredictable nature of the host computer's Ethernet data reception and SOME / IP message transmission, the high requirements of the test system for real-time data display, and the large resource consumption and long time required for data serialization and deserialization, the host computer may frequently freeze or even crash abnormally.
[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art.
[0006] Summary of the Invention
[0007] The main purpose of this application is to provide a SOME / IP service testing system and method, which aims to solve the technical problem that the host computer UI is prone to running blockage when conducting SOME / IP service testing in the prior art.
[0008] To achieve the above objectives, this application provides a SOME / IP service testing system, which includes a host computer, an Ethernet converter, and at least one vehicle controller. The host computer is connected to the Ethernet converter via an Ethernet harness, and the Ethernet converter is connected to the vehicle controller via a vehicle Ethernet harness.
[0009] The host computer is used to start the test interface thread, display the test interface to the user, and obtain the user's operation information in the test interface.
[0010] The host computer is also used to start a preset sub-thread based on the operation information to test the SOME / IP service in the vehicle controller. The preset sub-thread includes at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread.
[0011] The host computer is also used to generate test results after the test is completed, and to determine whether there is any abnormality in the SOME / IP service in the vehicle controller based on the test results.
[0012] Optionally, the host computer is equipped with an SOA client module, and the vehicle controller is equipped with an SOA server module. The SOA client module and the SOA server module establish a communication connection through the SOME / IP protocol.
[0013] Furthermore, to achieve the above objectives, this application provides a SOME / IP service testing method, which includes the following steps:
[0014] Start the test interface thread, display the test interface to the user, and obtain the user's operation information in the test interface;
[0015] Based on the operation information, a preset sub-thread is started to test the SOME / IP service in the vehicle controller. The preset sub-thread includes at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread.
[0016] After the test is completed, test results are generated, and based on the test results, it is determined whether there are any abnormalities in the SOME / IP service in the vehicle controller.
[0017] Optionally, based on the operation information, starting a preset sub-thread to test the SOME / IP services in multiple vehicle controllers includes:
[0018] When the operation information is service import operation information, the service import thread is started;
[0019] Read the service matrix according to the path in the service matrix;
[0020] Based on the service matrix, determine the network node information, service deployment information, and service interface information;
[0021] Based on the network node information, the service deployment information, and the service interface information, a list of vehicle controllers is displayed in the test interface, and the target vehicle controller selected by the user in the list is obtained.
[0022] Optionally, based on the operation information, starting a preset sub-thread to test the SOME / IP services in multiple vehicle controllers includes:
[0023] When the operation information is a service request operation information, the service request thread is started;
[0024] Determine the request parameters based on the service request operation information;
[0025] Generate a service request message based on the target service and the request parameters;
[0026] The service request message is sent to the target vehicle controller;
[0027] When a response to a request sent by the target vehicle controller is received within a preset time, the target service call is determined to be complete.
[0028] Optionally, the SOME / IP service testing method further includes:
[0029] Based on the network node information, the service deployment information, and the service interface information, the service list corresponding to the target vehicle controller is displayed in the test interface, and the target service selected by the user in the service list is obtained.
[0030] Optionally, based on the operation information, starting a preset sub-thread to test the SOME / IP services in multiple vehicle controllers includes:
[0031] When the operation information is subscription operation information, the connection subscription thread is started;
[0032] Based on the service deployment information, a service discovery message is generated;
[0033] The service discovery message is sent to the target vehicle controller;
[0034] Upon receiving a connection response from the target vehicle controller, a SOME / IP connection is established.
[0035] Optionally, after starting the connection subscription thread when the operation information is subscription operation information, the method further includes:
[0036] Based on the service interface information, a subscription message is generated;
[0037] The subscription message is sent to the target vehicle controller;
[0038] Upon receiving the subscription response from the target vehicle controller, the subscription is confirmed to be successful.
[0039] Optionally, based on the operation information, starting a preset sub-thread to test the SOME / IP services in multiple vehicle controllers includes:
[0040] The receiving thread is started when the service request thread or the connection subscription thread is started;
[0041] Upon receiving Ethernet data sent by the target vehicle controller, the Ethernet data is deserialized to obtain deserialized data;
[0042] The deserialized data is analyzed to determine whether it is reasonable.
[0043] When the deserialized data is valid, update the cache service data based on the deserialized data.
[0044] Optionally, based on the operation information, starting a preset sub-thread to test the SOME / IP services in multiple vehicle controllers includes:
[0045] The display thread is started within a preset period;
[0046] Read the cached service data of the target vehicle controller and display the cached service data in the test interface.
[0047] In this application, the SOME / IP service testing system includes a host computer, an Ethernet converter, and at least one vehicle controller. The host computer is connected to the Ethernet converter via an Ethernet harness, and the Ethernet converter is connected to the vehicle controller via a vehicle Ethernet harness. The host computer is used to start a test interface thread, display the test interface to the user, and obtain the user's operation information in the test interface. Based on the operation information, it starts a preset sub-thread to test the SOME / IP service in the vehicle controller. The preset sub-thread includes at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. After the test is completed, test results are generated, and based on the test results, it is determined whether there are any abnormalities in the SOME / IP service in the vehicle controller. This application constructs a complete, streamlined, and convenient testing system capable of testing the SOME / IP services of vehicle controllers. It eliminates the need to wait for real-vehicle testing; potential problems can be identified during the single-component testing phase. Furthermore, it boasts low testing costs and easy environment setup. Compared to traditional SOME / IP service testing methods, which often result in runtime blockages in the host computer UI, this application utilizes multithreading to separate modules with long processing / waiting times and high resource consumption, resolving the issue of UI blocking and crashes, improving the smoothness of SOME / IP testing, and enhancing the user-friendliness of the testing system. Attached Figure Description
[0048] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, wherein:
[0049] Figure 1 is a schematic diagram of the structure of the first embodiment of the SOME / IP service testing system of this application;
[0050] Figure 2 is a schematic diagram of the multi-vehicle controller structure of an embodiment of the SOME / IP service testing system of this application;
[0051] Figure 3 is a detailed structural diagram of an embodiment of the SOME / IP service testing system of this application;
[0052] Figure 4 is a schematic diagram of a thread of an embodiment of the SOME / IP service testing system of this application;
[0053] Figure 5 is a flowchart illustrating the first embodiment of the SOME / IP service testing method of this application;
[0054] Figure 6 is a schematic diagram of the test interface thread flow of an embodiment of the SOME / IP service testing method of this application;
[0055] Figure 7 is a flowchart illustrating the second embodiment of the SOME / IP service testing method of this application;
[0056] Figure 8 is a schematic diagram of the service import thread flow of an embodiment of the SOME / IP service testing method of this application;
[0057] Figure 9 is a schematic diagram of the connection subscription thread flow of an embodiment of the SOME / IP service testing method of this application;
[0058] Figure 10 is a schematic diagram of the receiving thread flow of an embodiment of the SOME / IP service testing method of this application;
[0059] Figure 11 is a flowchart illustrating the third embodiment of the SOME / IP service testing method of this application;
[0060] Figure 12 is a schematic diagram of the service request thread flow of an embodiment of the SOME / IP service testing method of this application;
[0061] Figure 13 is a flowchart illustrating the fourth embodiment of the SOME / IP service testing method of this application;
[0062] Figure 14 is a schematic diagram illustrating the thread flow of an embodiment of the SOME / IP service testing method of this application;
[0063] Figure 15 is a schematic diagram of the overall process of an embodiment of the SOME / IP service testing method of this application.
[0064] Explanation of key component symbols: Detailed Implementation
[0065] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of this application.
[0066] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0067] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0068] Furthermore, the use of terms such as "first" and "second" in this application is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed in this application.
[0069] Referring to Figure 1, which is a schematic diagram of the structure of the first embodiment of the SOME / IP service testing system of this application, this application proposes a first embodiment of the SOME / IP service testing system.
[0070] As shown in Figure 1, in this embodiment, the SOME / IP service testing system includes a host computer 10, an Ethernet converter 20, and at least one vehicle controller 30. The host computer 10 is connected to the Ethernet converter 20 via an Ethernet harness, and the Ethernet converter 20 is connected to the vehicle controller 30 via a vehicle Ethernet harness.
[0071] It should be noted that the host computer 10, as a SOME / IP client, can run SOME / IP service test programs to achieve multi-threaded SOME / IP testing. During the test, it can perform tests on functions such as SD (Service Discovery), Method calls, Event subscriptions, and status display.
[0072] It is understood that the Ethernet harness in this embodiment refers to a traditional Ethernet harness, based on IEEE 802.3u / 802.3ab, which implements 100Mbps / 1Gbps Ethernet communication over 2-4 pairs of unshielded twisted pairs. The vehicle-mounted Ethernet harness in this embodiment is based on IEEE 802.3bw / 802.3bp, which implements 100Mbps / 1Gbps Ethernet communication over 1 pair of unshielded twisted pairs. The Ethernet converter 20 in this embodiment can be a vehicle-mounted Ethernet converter, which can convert between vehicle-mounted Ethernet (1 pair of unshielded twisted pairs) and traditional Ethernet (2-4 pairs of unshielded twisted pairs), enabling Ethernet communication between the network port of the vehicle controller 30 and the network port of the host computer 10.
[0073] It should be understood that the vehicle controller 30, acting as a SOME / IP server, is used to deploy in-vehicle SOME / IP services in the SOA architecture, providing in-vehicle SOA services such as body / chassis / electrical systems. In this embodiment, the vehicle controller 30 can be any in-vehicle ECU of the SOME / IP service to be tested. The SOME / IP service testing system has at least one vehicle controller 30. If the SOME / IP service testing system has two or more vehicle controllers 30, the Ethernet converter 20 will connect them separately via the in-vehicle Ethernet harness, as shown in Figure 2.
[0074] Furthermore, as shown in Figure 3, the host computer is equipped with an SOA client module 101, and the vehicle controller is equipped with an SOA server module 301. The SOA client module 101 and the SOA server module 301 establish a communication connection through the SOME / IP protocol.
[0075] It should be noted that the host computer 10 and the vehicle controller 30 can establish a SOME / IP connection through the SOA client module 101 and the SOA server module 301.
[0076] In other embodiments, the vehicle controller 30 can be replaced by a HIL bench, which can simulate more real vehicle environments for testing. However, compared to using the vehicle controller 30 directly, the testing cost is increased and the environment setup is more difficult.
[0077] Understandably, the host computer 10 is used to start a test interface thread, display a test interface to the user, and obtain the user's operation information in the test interface; the host computer 10 is also used to start a preset sub-thread based on the operation information to test the SOME / IP service in the vehicle controller 30, the preset sub-thread including at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread; the host computer 10 is also used to generate test results after the test is completed, and determine whether there are any abnormalities in the SOME / IP service in the vehicle controller 30 based on the test results.
[0078] It should be understood that the test interface thread is the main UI thread in this embodiment, which can complete the display of the test interface of the host computer 10 and provide user operation entry points. The test interface can be set with operation entry points related to functions such as SD, Method calls, Event subscriptions, and status displays. These entry points can be in the form of input boxes, selection boxes, buttons, links, etc., such as: a service matrix import selection box, a start SD button, a Method request parameter input box, a Method request send button, etc. The test interface can also be set with windows for displaying information, such as: a Method reply information display window, an Event information real-time display window, an information prompt window, etc. These can be flexibly adjusted according to actual needs, and this embodiment does not impose any restrictions on them. Specifically, the service matrix import selection box can be used to select the path of the service matrix, the start SD button can be used to start the SD function, the Method request parameter input box can be used to input parameters related to the Method request, the Method request send button can be used to send a Method request, the Method reply information display window can be used to display the reply information of the Method request, the Event information real-time display window can be used to display Event-related information, and the information prompt window can be used to display some prompts.
[0079] It should be noted that users can perform operations within the test interface. These operations constitute the operation information, including the operation object and the operation data. The operation object is the object the user interacts with within the test interface. For example, if the user enters parameters in the Method request parameter input box, the operation object is the Method request parameter input box. If the user clicks the Start SD button, the operation object is the Start SD button. Operation data can be selected data or input data. Selected data refers to the content the user chooses within the operation object, such as the path selected in the Service Matrix Import selection box. Input data refers to the data the user enters within the operation object, such as the parameters entered in the Method request parameter input box.
[0080] It is understood that the preset sub-threads are multiple sub-threads set in this embodiment, and the sub-threads can run independently. As shown in Figure 4, the preset sub-threads include at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. Other sub-threads can also be set, and this embodiment does not impose any restrictions on this. The service import thread can be used to import service matrix information, the connection subscription thread can be used to start SD to establish SOME / IP connections and subscribe to Events, the service request thread can be used to send Method requests and invoke Methods, the receiving thread can be used to receive information / data, such as Method reply information and Event information, and the display thread can be used to display information / data, such as Method reply information and Event information.
[0081] It should be understood that different sub-threads are triggered by different user operations. In other words, the sub-thread that needs to be started can be determined based on the user's operation information.
[0082] It should be noted that the test results are obtained after testing the SOME / IP service. Based on the test results, the SOME / IP service in the vehicle controller can be analyzed to determine whether any problems / anomalies have occurred, so as to discover and expose problems in a timely manner.
[0083] Furthermore, the host computer 10 is also used to start the service import thread when the operation information is service import operation information;
[0084] Read the service matrix according to the path in the service matrix;
[0085] Based on the service matrix, determine the network node information, service deployment information, and service interface information;
[0086] Based on the network node information, the service deployment information, and the service interface information, a list of vehicle controllers is displayed in the test interface, and the target vehicle controller selected by the user in the list is obtained.
[0087] Furthermore, the host computer 10 is also used to start the service request thread when the operation information is service request operation information;
[0088] Determine the request parameters based on the service request operation information;
[0089] Generate a service request message based on the target service and the request parameters;
[0090] The service request message is sent to the target vehicle controller;
[0091] When a response to a request sent by the target vehicle controller is received within a preset time, the target service call is determined to be complete.
[0092] Furthermore, the host computer 10 is also used to display a service list corresponding to the target vehicle controller in the test interface based on the network node information, the service deployment information, and the service interface information, and to obtain the target service selected by the user in the service list.
[0093] Furthermore, the host computer 10 is also used to start the connection subscription thread when the operation information is subscription operation information;
[0094] Based on the service deployment information, a service discovery message is generated;
[0095] The service discovery message is sent to the target vehicle controller;
[0096] Upon receiving a connection response from the target vehicle controller, a SOME / IP connection is established.
[0097] Furthermore, the host computer 10 is also used to generate a subscription message based on the service interface information;
[0098] The subscription message is sent to the target vehicle controller;
[0099] Upon receiving the subscription response from the target vehicle controller, the subscription is confirmed to be successful.
[0100] Furthermore, the host computer 10 is also used to start the receiving thread when starting the service request thread or the connection subscription thread;
[0101] Upon receiving Ethernet data sent by the target vehicle controller, the Ethernet data is deserialized to obtain deserialized data;
[0102] The deserialized data is analyzed to determine whether it is reasonable.
[0103] When the deserialized data is valid, update the cache service data based on the deserialized data.
[0104] Furthermore, the host computer 10 is also used to start the display thread within a preset period;
[0105] Read the cached service data of the target vehicle controller and display the cached service data in the test interface.
[0106] It is understood that service import operation information refers to operation information related to service matrix import, such as selecting the path of the service matrix to be imported in the service matrix import selection box. This embodiment does not impose any restrictions on this. The operation information indicating service import operation information means that the user has performed an operation related to service matrix import, and at this time, the service import thread will be started to import the service matrix. Subscription operation information refers to operation information related to starting SD or subscribing to Event, such as pressing the start SD button. This embodiment does not impose any restrictions on this. The operation information indicating subscription operation information means that the user has performed an operation related to starting SD or subscribing to Event, and at this time, the connection subscription thread will be started. Service request operation information refers to operation information related to Method request or Method call, such as entering parameters in the Method request parameter input box and pressing the request send button, etc. This embodiment does not impose any restrictions on this. The operation information indicating service request operation information means that the user has performed an operation related to Method request or Method call, and at this time, the service request thread will be started.
[0107] It should be understood that when the service request thread or connection subscription thread is started, the receiving thread is also started simultaneously to receive Method response information or Event information. The display thread is usually started continuously at a preset period, which can be set to 10ms. This embodiment does not limit this. The display thread is started at the preset interval to dynamically refresh and display the Method response information or Event information.
[0108] In the specific implementation, based on the user's operation information, the sub-thread that needs to be started is determined, and the corresponding sub-thread is started to perform the corresponding tests. This can complete the testing of functions such as SD, Method calls, Event subscription, and status display in the SOME / IP service.
[0109] In this embodiment, the SOME / IP service testing system includes a host computer 10, an Ethernet converter 20, and at least one vehicle controller 30. The host computer 10 is connected to the Ethernet converter 20 via an Ethernet harness, and the Ethernet converter 20 is connected to the vehicle controller 30 via a vehicle Ethernet harness. The host computer 10 is used to start a test interface thread, display a test interface to the user, and obtain the user's operation information in the test interface. Based on the operation information, it starts a preset sub-thread to test the SOME / IP service in the vehicle controller 30. The preset sub-thread includes at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. After the test is completed, test results are generated, and based on the test results, it is determined whether there are any abnormalities in the SOME / IP service in the vehicle controller 30. This embodiment constructs a complete, streamlined, and convenient testing system capable of testing the SOME / IP services of the vehicle controller. It eliminates the need to wait for actual vehicle testing; potential problems can be identified during the single-component testing phase. Furthermore, it boasts low testing costs and easy environment setup. Compared to traditional SOME / IP service testing methods, where the host computer UI is prone to operational blockages, this embodiment utilizes multithreading to separate modules with long processing / waiting times and high resource consumption, resolving the issue of host computer UI interface blocking and crashes. This improves the smoothness of SOME / IP testing and, with its UI interface, enhances user-friendliness and ease of operation for test users.
[0110] This application provides a SOME / IP service testing method. Referring to Figure 5, Figure 5 is a flowchart illustrating the first embodiment of the SOME / IP service testing method of this application.
[0111] In this embodiment, the SOME / IP service testing method includes the following steps:
[0112] Step S10: Start the test interface thread, display the test interface to the user, and obtain the user's operation information in the test interface.
[0113] It should be noted that the SOME / IP service testing method in this embodiment is applied to the aforementioned SOME / IP service testing system. The SOME / IP service testing system includes a host computer, an Ethernet converter, and an on-board controller, the specific structure of which can be referred to Figures 1 to 3. The execution entity in this embodiment is the host computer in the SOME / IP service testing system. The host computer has a SOME / IP service testing program, which can implement SOME / IP service testing in a multi-threaded manner.
[0114] It is understood that the test interface thread is the main UI thread in this embodiment, which can implement the test interface display in the upper-level system and provide user operation entry points. The test interface can be set with operation entry points related to functions such as SD, Method calls, Event subscriptions, and status displays. These entry points can be in the form of input boxes, selection boxes, buttons, links, etc., such as: a service matrix import selection box, a start SD button, a Method request parameter input box, a Method request send button, etc. The test interface can also be set with windows for displaying information, such as: a Method reply information display window, an Event information real-time display window, an information prompt window, etc. These can be flexibly adjusted according to actual needs, and this embodiment does not impose any restrictions on them. Specifically, the service matrix import selection box can be used to select the path of the service matrix, the start SD button can be used to start the SD function, the Method request parameter input box can be used to input parameters related to the Method request, the Method request send button can be used to send a Method request, the Method reply information display window can be used to display the reply information of the Method request, the Event information real-time display window can be used to display Event-related information, and the information prompt window can be used to display some prompts.
[0115] It should be understood that users can perform corresponding operations on the operation entry points of the test interface. The relevant operations performed by the user for the test constitute the operation information, including the operation object and operation data. The operation object is the object on which the user performs operations within the test interface. For example, if the user enters parameters in the Method request parameter input box, the operation object is the Method request parameter input box. If the user clicks the Start SD button, the operation object is the Start SD button. Operation data can be selected data or input data. Selected data is the content chosen by the user within the operation object, such as the path selected by the user in the Service Matrix Import selection box. Input data is the data entered by the user within the operation object, such as the parameters entered by the user in the Method request parameter input box.
[0116] In the specific implementation, the main UI thread is started to complete the display of the host computer interface and the user operation entry, so that the user can operate on the operation entry and obtain relevant user operation information.
[0117] As shown in Figure 6, the test interface thread flow diagram shows that after the service matrix is successfully imported, SD can be started to establish a communication connection. Then, requests for methods, printing events, and printing method responses can be performed.
[0118] Step S20: Based on the operation information, start a preset sub-thread to test the SOME / IP service in the vehicle controller. The preset sub-thread includes at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread.
[0119] It should be noted that the preset sub-threads are multiple sub-threads set in this embodiment, and each sub-thread can run independently. Referring to Figure 4, the preset sub-threads include at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. Other sub-threads can also be set, and this embodiment does not impose any restrictions on this. The service import thread can be used to import service matrix information, the connection subscription thread can be used to start SD to establish SOME / IP connections and subscribe to Events, the service request thread can be used to send Method requests and invoke Methods, the receiving thread can be used to receive information / data, such as Method response information and Event information, and the display thread can be used to display information / data, such as Method response information and Event information.
[0120] It is understandable that different sub-threads are triggered by different user operations. In other words, the sub-thread that needs to be started can be determined based on the user's operation information. The sub-threads can be ordered or not; this embodiment does not impose any restrictions on this.
[0121] It should be understood that the service import thread, connection subscription thread, and service request thread are usually triggered by user operations. The receiving thread is usually started at the same time as the connection subscription thread or service request thread. The display thread is usually started continuously at a certain time period, which can be set to 10ms or adjusted flexibly according to actual needs. This embodiment does not impose any restrictions on this.
[0122] In the specific implementation, the sub-threads that need to be started are determined according to the customer's operation information, and different sub-threads are used to complete the testing of functions such as SD, Method calls, Event subscription, and status display in the SOME / IP service.
[0123] In addition, a polling approach can be used when executing each sub-thread. After a sub-thread is triggered by a user action, it needs to wait for a polling time before it officially starts running. The polling time can be set according to actual needs; this embodiment does not impose any restrictions on it. Although a small number of blocking issues may occur after adopting the polling mechanism, it still achieves an optimization effect compared to traditional testing methods.
[0124] Step S30: After the test is completed, generate the test results and determine whether there is any abnormality in the SOME / IP service in the vehicle controller based on the test results.
[0125] It should be noted that the test results are obtained after testing the SOME / IP service. Based on the test results, the SOME / IP service in the vehicle controller can be analyzed to determine whether any problems / anomalies have occurred, so as to discover and expose problems in a timely manner.
[0126] In this embodiment, a test interface thread is started to display a test interface to the user and obtain the user's operation information on the test interface. Based on the operation information, a preset sub-thread is started to test the SOME / IP service in the vehicle controller. The preset sub-thread includes at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. After the test is completed, test results are generated. Based on the test results, it is determined whether there are any abnormalities in the SOME / IP service in the vehicle controller. Compared with the traditional testing method for SOME / IP service, the host computer UI is prone to running blockage. This embodiment uses multi-threading to separate modules with long processing / waiting times and high resource consumption, solving the problem of running blockage in the host computer UI, improving robustness, and enhancing the smoothness of SOME / IP testing.
[0127] Referring to Figure 7, which is a flowchart of a second embodiment of a SOME / IP service testing method according to this application.
[0128] Based on the above embodiments, step S20 includes:
[0129] Step S201: When the operation information is service import operation information, start the service import thread.
[0130] It should be noted that the service import operation information refers to operation information related to the import of the service matrix, such as selecting the path of the service matrix to be imported in the service matrix import selection box. This embodiment does not impose any restrictions on this. The fact that the operation information is "service import operation information" indicates that the user has performed an operation related to the import of the service matrix. At this time, the service import thread will be started to import the service matrix.
[0131] Step S202: Read the service matrix according to the path of the service matrix, and determine the network node information, service deployment information and service interface information according to the service matrix.
[0132] Understandably, the service matrix path is determined by the user's operation information, specifically the path selected by the user in the service matrix import selection box. The corresponding service matrix is then imported according to this path.
[0133] It should be understood that network node information can be the network IP address of the vehicle controller, service deployment information is the service content that the vehicle controller needs to test, and service interface information is the relevant interface information in the vehicle controller used for service testing.
[0134] In the specific implementation, the corresponding service matrix is imported according to the path selected by the user to obtain network node information, service deployment information, and service interface information.
[0135] Step S203: Based on the network node information, the service deployment information, and the service interface information, display a list of vehicle controllers in the test interface, and obtain the target vehicle controller selected by the user in the list of vehicle controllers.
[0136] It should be noted that the vehicle controller list refers to a list of all vehicle controllers under test in the test system. The target vehicle controller is the one currently being tested, and is selected by the user from the vehicle controller list. Since the test system is connected to at least one vehicle controller, when there is only one vehicle controller in the test system, the target vehicle controller is that controller. When there is more than one vehicle controller in the test system, the target vehicle controller can be any of the vehicle controllers.
[0137] In practice, all vehicle controllers to be tested are displayed to the user, and the target vehicle controller is determined based on the user's selection.
[0138] As shown in Figure 8, the service import thread process is as follows: after the main UI thread starts, the service matrix is first imported, service-related information is loaded, service information and deployment information that need to be tested are obtained, and service requests can be sent to the correct target vehicle controller.
[0139] Furthermore, based on the network node information, the service deployment information, and the service interface information, the service list corresponding to the target vehicle controller is displayed in the test interface, and the target service selected by the user in the service list is obtained.
[0140] Understandably, each vehicle controller has corresponding test content / services. The service list contains all the content / services that each vehicle controller needs to be tested, and the target service is the content / service currently being tested, which can be selected by the user from the service list.
[0141] In practice, all test content / services of the target vehicle controller are displayed to the user, and the target service is determined based on the user's selection.
[0142] Furthermore, after step S203, the method further includes:
[0143] Step S204: When the operation information is subscription operation information, start the connection subscription thread.
[0144] It should be understood that subscription operation information refers to operation information related to launching SD or subscribing to an event, such as pressing the launch SD button. This embodiment does not limit this. The operation information indicating subscription operation information means that the user has performed an operation related to launching SD or subscribing to an event, at which point the connection subscription thread will be started.
[0145] Step S205: Based on the service deployment information, generate a service discovery message and send the service discovery message to the target vehicle controller. Upon receiving the connection response from the target vehicle controller, determine to establish a SOME / IP connection.
[0146] It should be noted that the service discovery message is the packaged SD message. The SD message is assembled according to the service deployment information and the format specified in the SOME / IP standard. After the SD message is sent to the target vehicle controller, if a reply (i.e., a connection reply) is received from the target vehicle controller, the connection is considered to have been successfully established, and the SD is completed.
[0147] Step S206: Generate a subscription message based on the service interface information, send the subscription message to the target vehicle controller, and confirm successful subscription upon receiving a subscription reply from the target vehicle controller.
[0148] It is understandable that a subscription message is a packaged EventGroup subscription message. Based on the service interface information, the EventGroup subscription message is packaged according to the SOME / IP specification format. The specific Events to be subscribed to can be determined by the user's selection. After sending the EventGroup subscription message to the target vehicle controller, if a response (i.e., a subscription reply) is received from the target vehicle controller, the Event subscription is considered successful.
[0149] As shown in Figure 9, the connection subscription thread flow diagram requires that the SOME / IP service feature first perform SD (Service Deployment) at runtime. Based on the service deployment information, SD messages are packaged, and based on the service interface information, EventGroup subscription messages are packaged and sent. The SD messages and EventGroup messages are then sent to establish a SOME / IP connection with the target vehicle controller and subscribe to the EventGroup.
[0150] It should be understood that establishing a SOME / IP connection and subscribing to an EventGroup can be done separately, i.e., establishing the SOME / IP connection first and then subscribing to the EventGroup. Alternatively, establishing the SOME / IP connection and subscribing to the EventGroup can be done together, i.e., sending the SD message and the EventGroup message together to the target vehicle controller. If the subscription to the EventGroup is successful, it indicates that the SOME / IP connection has been successfully established.
[0151] Furthermore, step S20 also includes:
[0152] Step S207: When starting the service request thread or the connection subscription thread, start the receiving thread.
[0153] It should be noted that when starting the service request thread or the connection subscription thread, a receiving thread will also be started simultaneously to receive Method response information or Event information.
[0154] In this embodiment, the service request thread needs to receive Event information.
[0155] Step S208: Upon receiving Ethernet data sent by the target vehicle controller, the Ethernet data is deserialized to obtain deserialized data.
[0156] It is understood that the Ethernet data sent by the target vehicle controller, i.e., the message sent by the target vehicle controller, can be a method reply message or an event message; in this embodiment, it is an event message. Deserialized data is the data / information obtained after the message has been deserialized.
[0157] Step S209: Analyze the deserialized data to determine whether the deserialized data is reasonable. If the deserialized data is reasonable, update the cache service data according to the deserialized data.
[0158] In the specific implementation, the deserialized data is parsed, and the local cached service data (i.e., cached service data) is updated when appropriate.
[0159] As shown in Figure 10, the receiving thread process uses a separate thread (receiving thread) to receive and parse the SOME / IP messages (Event and Method replies) sent by the target vehicle controller. It continuously monitors the SOME / IP connection with the target vehicle controller, reads the Ethernet buffer through the socket's recvfrom function, performs data deserialization, and refreshes the local cached service data according to the service content in the message.
[0160] In this embodiment, based on the operation information, preset sub-threads are started to test the SOME / IP service in the vehicle controller. These preset sub-threads include at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. This embodiment determines the sub-threads to be started according to the customer's operation information, and uses different sub-threads to complete the testing of functions such as SD and Event subscription in the SOME / IP service. By using multi-threading, modules with long processing / waiting times and high resource consumption are separated, solving the problem of blocking in the host computer UI interface, enhancing robustness, and improving the smoothness of SOME / IP testing.
[0161] Referring to Figure 11, which is a flowchart of a third embodiment of a SOME / IP service testing method according to this application.
[0162] Based on the above embodiments, the method further includes the following after step S203:
[0163] Step S204': When the operation information is service request operation information, start the service request thread.
[0164] It should be noted that testing the target service requires calling a Method, and calling a Method requires first making a Method request. Service request operation information refers to operation information related to the Method request or Method call, such as entering parameters in the Method request parameter input box and pressing the request send button. This embodiment does not impose any restrictions on this. The operation information indicates that the user has performed an operation related to the Method request or Method call, at which point the service request thread will be started.
[0165] Step S205': Generate a service request message based on the target service and the request parameters.
[0166] It is understandable that the request parameters are the parameters related to the Method request input by the user, and the service request message is the Method request message, which has been serialized and assembled.
[0167] Step S206': Send the service request message to the target vehicle controller. When a request response is received from the target vehicle controller within a preset time, it is determined that the target service call is complete.
[0168] It should be understood that the preset time is the time set for receiving a response. If no response is received within this time, the response is considered to have timed out. After sending the service request message to the target vehicle controller, if a response (i.e., a request reply) is received from the target vehicle controller before the timeout, the Method call can be considered complete.
[0169] It should be noted that in this embodiment, the receiving thread receives the Method response information.
[0170] As shown in Figure 12, when calling the Method of the target service, a separate Method request thread (i.e., the service request thread) is started. The Method request message is serialized and assembled according to the SOME / IP specification format based on the service information and request parameters. After completion, the Ethernet message is sent to the target vehicle controller. When the reply message from the target vehicle controller is received before the timeout, the received reply message is deserialized and stored in the cached service data.
[0171] In this embodiment, based on the operation information, preset sub-threads are started to test the SOME / IP service in the vehicle controller. These preset sub-threads include at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. This embodiment determines the sub-threads to be started according to the customer's operation information, and uses different sub-threads to complete the testing of the Method call function in the SOME / IP service. By using multi-threading, modules with long processing / waiting times and high resource consumption are separated, solving the problem of blocking in the host computer UI, enhancing robustness, and improving the smoothness of the SOME / IP test.
[0172] Referring to Figure 13, which is a flowchart of the fourth embodiment of a SOME / IP service testing method of this application.
[0173] Based on the above embodiments, step S20 further includes:
[0174] Step S201': Start the display thread within a preset period.
[0175] It should be noted that the preset period is the set startup cycle of the display thread, for example, starting once every 10ms. This can be flexibly adjusted according to actual needs, and this embodiment does not impose any restrictions on it. When the preset period is reached, the display thread will start automatically.
[0176] Step S202': Read the cache service data of the target vehicle controller and display the cache service data in the test interface.
[0177] It is understandable that, according to a preset cycle, the service data cached locally is read and the relevant information / data, such as Method response information and Event information, is updated in the display window of the test interface. This embodiment does not impose any restrictions on this.
[0178] As shown in Figure 14, a timed thread (display thread) is used to dynamically refresh the Method response information display window and the Event information real-time display window, and dynamically print the locally cached service data to the target window / list.
[0179] As shown in Figure 15, the overall process first involves importing the service matrix, loading service information, obtaining the service information and deployment information to be tested, and then assembling and sending SD messages and subscription EventGroup messages according to the SOME / IP specification based on the service deployment information. A SOME / IP connection is established with the target vehicle controller. The Method request message is serialized and assembled according to the SOME / IP specification based on the service information and request parameters. After completion, an Ethernet message is sent to the target vehicle controller. The SOME / IP connection with the target vehicle controller is continuously monitored. The Ethernet cache is read through the socket's recvfrom function. Then, the data is deserialized, and the service data in the local cache is refreshed according to the service content in the message. The service data in the local cache is dynamically printed to the target window / list.
[0180] In this embodiment, based on the operation information, preset sub-threads are started to test the SOME / IP service in the vehicle controller. These preset sub-threads include at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. This embodiment determines the sub-threads to be started according to the customer's operation information, and uses different sub-threads to complete the testing of functions such as SD and Method calls, Event subscriptions, and status displays in the SOME / IP service. By using multi-threading, modules with long processing / waiting times and high resource consumption are separated, solving the problem of blocking in the host computer UI interface, enhancing robustness, and improving the smoothness of SOME / IP testing.
[0181] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solution of this application. In specific applications, those skilled in the art can make settings as needed, and this application does not impose any restrictions on this.
[0182] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this application. In practical applications, those skilled in the art can select some or all of it to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.
[0183] In addition, for technical details not described in detail in this embodiment, please refer to the SOME / IP service testing method provided in any embodiment of this application, which will not be repeated here.
[0184] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, product, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, product, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, product, or system that includes that element.
[0185] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0186] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0187] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A SOME / IP service testing system, wherein, The SOME / IP service testing system includes a host computer, an Ethernet converter, and at least one vehicle controller. The host computer is connected to the Ethernet converter via an Ethernet harness, and the Ethernet converter is connected to the vehicle controller via a vehicle Ethernet harness. The host computer is used to start the test interface thread, display the test interface to the user, and obtain the user's operation information in the test interface. The host computer is also used to start a preset sub-thread based on the operation information to test the SOME / IP service in the vehicle controller. The preset sub-thread includes at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. The host computer is also used to generate test results after the test is completed, and to determine whether there is any abnormality in the SOME / IP service in the vehicle controller based on the test results.
2. The system as claimed in claim 1, wherein, The host computer is equipped with an SOA client module, and the vehicle controller is equipped with an SOA server module. The SOA client module and the SOA server module establish a communication connection through the SOME / IP protocol.
3. A method for testing SOME / IP services, wherein, The SOME / IP service testing method, applied to the SOME / IP service testing system as described in claim 1 or 2, includes: Start the test interface thread, display the test interface to the user, and obtain the user's operation information in the test interface; Based on the operation information, a preset sub-thread is started to test the SOME / IP service in the vehicle controller. The preset sub-thread includes at least a service import thread, a connection subscription thread, a service request thread, a receiving thread, and a display thread. After the test is completed, test results are generated, and based on the test results, it is determined whether there are any abnormalities in the SOME / IP service in the vehicle controller.
4. The method of claim 3, wherein, Based on the operation information, a preset sub-thread is started to test the SOME / IP services in multiple vehicle controllers, including: When the operation information is service import operation information, the service import thread is started; Read the service matrix according to the path in the service matrix; Based on the service matrix, determine the network node information, service deployment information, and service interface information; Based on the network node information, the service deployment information, and the service interface information, a list of vehicle controllers is displayed in the test interface, and the target vehicle controller selected by the user in the list is obtained.
5. The method of claim 4, wherein, Based on the operation information, a preset sub-thread is started to test the SOME / IP services in multiple vehicle controllers, including: When the operation information is a service request operation information, the service request thread is started; Determine the request parameters based on the service request operation information; Generate a service request message based on the target service and the request parameters; The service request message is sent to the target vehicle controller; When a response to a request sent by the target vehicle controller is received within a preset time, the target service call is determined to be complete.
6. The method of claim 5, wherein, The SOME / IP service testing method also includes: Based on the network node information, the service deployment information, and the service interface information, the test interface displays... The service list corresponding to the target vehicle controller is obtained, and the target service selected by the user in the service list is obtained.
7. The method of claim 4, wherein, Based on the operation information, a preset sub-thread is started to test the SOME / IP services in multiple vehicle controllers, including: When the operation information is subscription operation information, the connection subscription thread is started; Based on the service deployment information, a service discovery message is generated; The service discovery message is sent to the target vehicle controller; Upon receiving a connection response from the target vehicle controller, a SOME / IP connection is established.
8. The method of claim 7, wherein, After starting the connection subscription thread when the operation information is subscription operation information, the method further includes: Based on the service interface information, a subscription message is generated; The subscription message is sent to the target vehicle controller; Upon receiving the subscription response from the target vehicle controller, the subscription is confirmed to be successful.
9. The method according to any one of claims 5 to 8, wherein, Based on the operation information, a preset sub-thread is started to test the SOME / IP services in multiple vehicle controllers, including: The receiving thread is started when the service request thread or the connection subscription thread is started; Upon receiving Ethernet data sent by the target vehicle controller, the Ethernet data is deserialized to obtain deserialized data; The deserialized data is analyzed to determine whether it is reasonable. When the deserialized data is valid, update the cache service data based on the deserialized data.
10. The method of claim 9, wherein, Based on the operation information, a preset sub-thread is started to test the SOME / IP services in multiple vehicle controllers, including: The display thread is started within a preset period; Read the cached service data of the target vehicle controller and display the cached service data in the test interface.