Simulation test method and device for scene construction, electronic equipment, vehicle and storage medium
By obtaining and processing DDS data packet files, generating and inputting scene data messages into the DDS service entity simulation tool, it solves the problem that traditional DDS service simulation tests cannot simulate actual scenes, and realizes real scene simulation and data communication load of DDS services. Effective simulation improves the authenticity and efficiency of the test.
Patent Information
- Application Number
- CN202411033368.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-08
AI Technical Summary
Traditional DDS service simulation testing cannot truly simulate the data communication load in the actual vehicle business scenario. It lacks a physical environment and is difficult to effectively test the data interaction of the domain control unit.
By obtaining the network data packet file of a single scenario of the vehicle under the DDS data distribution service agreement, process and generate the scenario data packets, and input them into the DDS service entity simulation tool to conduct business function testing, including parsing, modification and feedback data packets text to simulate data communication in actual scenarios.
Real-scenario simulation testing of DDS services is realized, which can simulate the data communication load in actual vehicle business scenarios, improve the authenticity and efficiency of the test, and reduce the dependence on the real vehicle environment.
Smart Images

Figure CN118748646A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a simulation test method, device, electronic equipment, vehicle and storage medium for scenario construction. Background Art
[0002] In recent years, with the rapid advancement of the "new four modernizations" of automobiles (intelligence, networking, electrification, and sharing), especially the emergence of smart cockpits, smart driving, and smart chassis, the automotive electronic and electrical architecture has evolved from the traditional distributed architecture to a service-oriented architecture (Service-Oriented-Architecture, or SOA). The SOA architecture is centered on DDS (data distribution service), based on the RTPS (real-time distributed subscription) protocol for Ethernet network transmission, running service entities on different domain controllers, and communicating between services through precisely defined interfaces. The types of Ethernet network transmission data streams in static vehicle usage scenarios and dynamic driving scenarios are rich and complex. There is a lack of a physical environment during domain control unit testing, and DDS service data simulation is required to simulate the service functions of the vehicle.
[0003] In this context, the traditional testing method is to call the DDS service signal tool according to the test case and input the corresponding single service data stream to simulate the data interaction between the tested domain controller and other domain controllers. The defect of the traditional method is that it cannot truly simulate the data communication load in the actual scenario of the vehicle business. Summary of the invention
[0004] In view of this, in order to solve some or all of the above-mentioned technical problems, the present application provides a simulation test method, device, electronic device, vehicle and storage medium for scene construction.
[0005] In one aspect, the present invention provides a simulation test method for scenario construction, the method comprising:
[0006] Obtain the network data packet file of a single scenario of the vehicle under the DDS data distribution service agreement;
[0007] Processing the network data packet file of a single scene to generate a scene data message of the single scene;
[0008] The scenario data message is input into the DDS service entity simulation tool to test the service function under the single scenario.
[0009] The processing of the network data packet file of a single scene to generate the scene data message of the single scene is specifically as follows:
[0010] According to the data format of the DDS protocol, the network data packet file of a single scene is parsed to generate a scene data message of the single scene.
[0011] The step of inputting the scenario data message into the DDS service entity simulation tool to test the service function in the single scenario is as follows:
[0012] According to the predetermined test requirements, the scenario data message of the single scenario is modified to generate the modified scenario data message;
[0013] The modified scenario data message is input into the DDS service entity simulation tool to test the service function under the single scenario.
[0014] The scene data message includes at least one DDS message frame; the DDS message frame includes topicName, serialized data, message timestamp, source address information, and target address information;
[0015] The topicName indicates: the topic name corresponding to the business in the current scenario;
[0016] The serialized data representation represents: data on the business status of the business in the current scenario;
[0017] The message timestamp indicates: the sending or receiving time of the DDS message frame;
[0018] The source address information indicates: the sending address of the DDS message frame;
[0019] The target address information indicates: a receiving address of a DDS message frame;
[0020] The scenario data message of the single scenario is modified according to the predetermined test requirements to generate the modified scenario data message as follows:
[0021] Deleting a message frame whose message timestamp is a predetermined time from the scene data message; or
[0022] Inserting a custom message frame into the scene data message; or
[0023] In the scene data message, deleting the message frame of the predetermined service interface; or
[0024] Modify the serialized data of the predetermined message frame in the scene data message.
[0025] The deleting the message frame whose message timestamp is the predetermined time from the scene data message specifically comprises: selecting the predetermined time that affects the service to be tested, and deleting the message frame corresponding to the predetermined time from the scene data message;
[0026] The inserting of the custom message frame into the scene data message specifically comprises: generating a custom message frame according to the test requirements; inserting the custom message frame into the scene data message;
[0027] In the scenario data message, the message frame for deleting the predetermined service interface is specifically:
[0028] Select a predetermined service that affects the service to be tested, and delete a message frame of the predetermined service interface from the scenario data message; or
[0029] The modifying of the serialized data of the predetermined message frame in the scenario data message specifically includes: selecting a service state that affects the service to be tested, and modifying the service state function in the serialized data of the predetermined message frame in the scenario data message.
[0030] The step of inputting the scenario data message into the DDS service entity simulation tool to test the service function in the single scenario is as follows:
[0031] Input the scenario data message of a single scenario into the DDS service entity simulation tool;
[0032] The DDS service entity simulation tool reads the DDS message frames in sequence according to the message timestamps of the DDS message frames of the scene data messages;
[0033] The DDS service entity simulation tool selects the controller under test based on the target address information of the DDS message frame;
[0034] The DDS service entity simulation tool parses the serialized data of the DDS message frame, generates a sending task of the service corresponding to the serialized data, and establishes a communication link with the screened controller under test;
[0035] The DDS service entity simulation tool determines the refill rate according to the message timestamp of the DDS message frame of the scene data message, and sends the scene data message to the controller under test.
[0036] The network data packet file for obtaining a single scenario of a vehicle under the DDS service agreement is specifically:
[0037] In a single vehicle scenario, network transmission messages between controllers under the DDS service protocol are collected to generate network data packet files.
[0038] The method further comprises:
[0039] Search the serialized data carried in the DDS message frame message to match the hash value feature of the predetermined upper-layer business service interface;
[0040] According to the correspondence between the preset hash value feature and the upper-layer business service interface, obtain the label of the business corresponding to the matching hash value feature;
[0041] A scene description file is generated according to the tag and the DDS message frame message, and outputted.
[0042] The present invention also provides a simulation test method for scene construction, the device comprising:
[0043] An acquisition unit, used for acquiring a network data packet file of a single scene of a vehicle under a DDS data distribution service agreement;
[0044] A processing unit, used for processing the network data packet file of a single scene to generate a scene data message of the single scene;
[0045] The testing unit is used to input the scenario data message into the DDS service entity simulation tool to test the service function in the single scenario.
[0046] The present invention further provides an electronic device, characterized in that it comprises:
[0047] Memory for storing computer programs;
[0048] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the above method is implemented.
[0049] The present invention also provides a vehicle, comprising:
[0050] Memory for storing computer programs;
[0051] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the above method is implemented.
[0052] The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the above method when executed by a processor.
[0053] In this application, a network data packet file of a single scenario of a vehicle under the DDS data distribution service protocol is obtained; the network data packet file of a single scenario is processed to generate a scenario data message of the single scenario; the scenario data message is input into the DDS service entity simulation tool to test the service function in the single scenario. In the present invention, the network data packet file is obtained based on the actual scenario, so it can truly simulate the data communication load in the actual scenario of the whole vehicle business. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0055] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0056] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0057] Figure 1 A flowchart of a simulation test method for scenario construction provided in an embodiment of the present application;
[0058] Figure 2 A schematic diagram of a test environment for a simulation test method for scenario construction according to an embodiment of the present invention;
[0059] Figure 3 A schematic diagram of a flow chart of scene data analysis and construction of a simulation test method for scene construction according to an embodiment of the present invention;
[0060] Figure 4 A schematic diagram of a process of recharging scene data in a simulation test method for scene construction according to an embodiment of the present invention;
[0061] Figure 5 A schematic diagram of a flow chart of a simulation test device for scenario construction provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0063] Various exemplary embodiments of the present application will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. It should be noted that unless otherwise specifically stated, the relative arrangement of the components and steps, the numerical expressions and the numerical values described in these embodiments do not limit the scope of the present application.
[0064] Those skilled in the art will understand that the terms "first" and "second" in the embodiments of the present application are only used to distinguish between different steps, devices, modules and other objects, and do not represent any specific technical meanings, nor do they indicate the logical order between them.
[0065] It should also be understood that in this embodiment, “plurality” may refer to two or more than two, and “at least one” may refer to one, two or more than two.
[0066] It should also be understood that any component, data or structure mentioned in the embodiments of the present application can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.
[0067] In addition, the term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0068] It should also be understood that the description of the various embodiments in this application focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.
[0069] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present application, its application, or uses.
[0070] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the above-mentioned technologies, methods, and equipment should be considered as part of the specification.
[0071] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0072] It should be noted that, in the absence of conflict, the embodiments in this application and the features in the embodiments can be combined with each other. To facilitate the understanding of the embodiments of the present application, the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0073] First, the communication protocol involved in the present invention is explained:
[0074] DDS (Data Distribution Service) is a distributed communication specification released by the OMG (Object Management Group). It adopts a subscription-publishing model, provides communication services in the form of middleware, and provides QoS (Quality of Service) strategies to ensure real-time, efficient, and flexible data distribution.
[0075] DDS service communication occurs between the server and the client. The server broadcasts its own state change signal events through the ntf method. The client entity listens to ntf (notification) by subscribing to the topic and actively initiates rpc (remote procedure call) requests (get or set) to obtain and set the server data.
[0076] like Figure 1 As shown, the present invention provides a simulation test method for scene construction, the method comprising:
[0077] Step 11, obtain the network data packet file of a single scenario of the vehicle under the DDS data distribution service agreement; in this step, according to the user's use needs, select different static use scenarios and dynamic driving scenarios of the real vehicle, and collect the network transmission messages between domain controllers to pcap (packet capture format detailed explanation) files. In a single scenario of the vehicle, collect the network transmission messages between controllers under the DDS service protocol to generate a network data packet file.
[0078] Step 12, process the network data packet file of a single scene to generate a scene data message of the single scene; in this step, according to the test requirements, the collected pcap file is processed and parsed into a large number of DDS service data packets under a single topic, and then a single DDS message frame is obtained.
[0079] Step 13: input the scenario data message into the DDS service entity simulation tool to test the service function in the single scenario.
[0080] In this embodiment, the network data packet file is obtained based on an actual scenario, and therefore can truly simulate the data communication load in the actual scenario of the whole vehicle business.
[0081] The step 12 specifically includes: parsing the network data packet file of a single scene according to the data format of the DDS protocol to generate a scene data message of the single scene.
[0082] In one embodiment, step 13 is specifically as follows:
[0083] Step 131A, modifying the scenario data message of the single scenario according to the predetermined test requirements to generate the modified scenario data message;
[0084] Step 132A, input the modified scenario data message into the DDS service entity simulation tool to test the service function in the single scenario.
[0085] Therefore, the present invention can modify a universal test module according to test requirements, thereby improving test efficiency.
[0086] The scene data message includes at least one DDS message frame; the DDS message frame includes topicName, serialized data, message timestamp, source address information, and target address information;
[0087] The topicName indicates: the topic name corresponding to the business in the current scenario;
[0088] The serialized data representation represents: data on the business status of the business in the current scenario;
[0089] The message timestamp indicates: the sending or receiving time of the DDS message frame;
[0090] The source address information indicates: the sending address of the DDS message frame;
[0091] The target address information indicates: the receiving address of the DDS message frame.
[0092] The present invention can be modified accordingly according to the general data format of the message frame.
[0093] In one embodiment, step 131 is specifically as follows:
[0094] Deleting a message frame whose message timestamp is a predetermined time from the scene data message, specifically: selecting a predetermined time that affects the service to be tested, and deleting a message frame corresponding to the predetermined time from the scene data message;
[0095] Inserting a custom message frame into the scene data message is specifically: generating a custom message frame according to the test requirements; inserting a custom message frame into the scene data message;
[0096] In the scenario data message, deleting the message frame of the predetermined service interface is specifically: selecting a predetermined service that affects the service to be tested, and deleting the message frame of the predetermined service interface from the scenario data message; or
[0097] The serialized data of the predetermined message frame in the scenario data message is modified, specifically: a service state affecting the service to be tested is selected, and the service state function in the serialized data of the predetermined message frame in the scenario data message is modified.
[0098] In the above embodiment, the constructed scene data message can be customized and modified according to the test needs. Since the test needs to be performed in a large number of different scenarios, the data message of a single scene can be modified, and a plurality of scenes that meet the test requirements can be generated with one scene as a template to reduce the frequency of data collection on the real vehicle. The operation method can be to perform one of the following operations on the above data frame: delete the message frame at a specific time; insert a custom message frame at a specific time; delete the message frame of a specific service interface; rewrite and replace the serialized data of a specific message frame. The specific conditions in the above operations depend on the specific test requirements and may not be modified. The present invention provides a method for constructing and rewriting real vehicle scene data, which solves the defect that scene data needs to be collected in a real vehicle environment and can be generated by customization.
[0099] In one embodiment, step 13 is specifically as follows:
[0100] Step 131B, inputting the scene data message of a single scene into the DDS service entity simulation tool;
[0101] Step 132B, the DDS service entity simulation tool reads the DDS message frames in sequence according to the message timestamps of the DDS message frames of the scene data message;
[0102] Step 133B, the DDS service entity simulation tool selects the controller under test according to the target address information of the DDS message frame;
[0103] Step 134B, the DDS service entity simulation tool parses the serialized data of the DDS message frame, generates a sending task of the service corresponding to the serialized data, and establishes a communication link with the screened controller under test;
[0104] Step 135B: The DDS service entity simulation tool determines the refill rate according to the message timestamp of the DDS message frame of the scene data message, and sends the scene data message to the controller under test.
[0105] In the above embodiment, step 13 inputs the processed scene data into the DDS service entity simulation tool. The simulation entity reads the scene data message in sequence according to the target address information and the message frame timestamp, parses the serialized valid information carried in the scene, generates the sending task of the corresponding service, and after establishing a communication link with the domain controller under test, sends the above scene information in sequence to achieve the effect of scene reconstruction and re-injection. In the above operation, the data re-injection of a single scene is completed, and the switching of different scenes can also be performed as needed.
[0106] In the above embodiment, the DDS service simulation entity parses the scene data and re-injects the scene data to achieve real vehicle scene reproduction and communication load simulation, which is applied to the unit test business, so that the test process is close to the test drive scene and the testable business functions are expanded. In addition, by collecting data based on the actual vehicle usage scenario and re-injecting the real vehicle scene data into the unit domain control, the actual vehicle environment scene is reconstructed on the test bench; the present invention implements the function of parsing messages and marking scenes after data collection at the software level, and then realizes the simulation of the scene data at the software level, which greatly reduces the intervention of specific hardware.
[0107] The method further comprises:
[0108] Step 14, searching from the serialized data carried in the DDS message frame message, matching the hash value feature of the predetermined upper-layer business service interface;
[0109] Step 15, according to the correspondence between the preset hash value feature and the upper-layer business service interface, obtain the label of the business corresponding to the matching hash value feature;
[0110] Step 16: Generate a scene description file according to the tag and the DDS message frame message, and output it.
[0111] In the above embodiment, according to the test needs, the collected pcap files are processed and parsed into a large number of DDS service data packets under a single topic, and then the topicName, serialized data, message timestamp, source address information, and target address information carried by a single DDS message frame are obtained. For a single message, by searching for valid data carried in the message and matching the hash value characteristics of the upper-layer business service interface, the business service function corresponding to the message frame can be marked, and the label of the above message frame is written into the scene description file to form a mapping table of the same real vehicle scene and corresponding data. Therefore, the present invention can parse and mark the real vehicle scene data, and the tester can check whether there is a functional problem through the relevant business process during the communication process.
[0112] The application scenarios of the present invention are described below.
[0113] The present invention provides a scenario construction simulation test method, which solves the problem that the traditional DDS service simulation test scheme cannot simulate the distribution and load of DDS service data in the actual vehicle usage scenario, including the steps of parsing, translating, rewriting, and recharging DDS protocol data.
[0114] The test environment required to implement the above invention is as follows:
[0115] Host computer, including DDS data analysis tools and DDS service entity simulation tools.
[0116] The controller test bench to be tested includes the cockpit controller to be tested and the test bench, completing the Ethernet connection between the ECU controller and the host computer.
[0117] Among them, the DDS service entity simulation tool is specifically: it can simulate the DDS service corresponding to the business, establish a communication link with the controller under test, initialize all DDS services when starting, establish a communication link to read the scene data file (pcap file), and obtain the timestamp and serialized data of each data frame. According to the order and time interval of a single data frame, the ntf interface of the corresponding service is called in sequence, and the serialized data is passed into the ntf interface in sequence and called. The simulation tool sends an event containing serialized data to the controller under test to realize scene re-injection. The DDS service simulation entity tool of the present invention can simulate all body services when it does not rely on real vehicle data, and receive data requests from the other end, and respond automatically, completely free from manual operation simulation. It can be used for automotive intelligent cockpit function testing or automation testing, real vehicle usage scenario integration testing, etc.
[0118] Test environment such as Figure 2 As shown, it includes a host computer, a controller to be tested, and an Ethernet converter. The host computer is installed with a DDS service scenario data parsing and construction tool and a DDS service entity simulation tool. The Ethernet converter is used to connect the controller to be tested with the host computer.
[0119] Test process: Figure 3 and Figure 4 As shown, firstly, network data packets are collected in the actual vehicle usage scenario, the pcap packets are parsed by the DDS parsing tool software, and the carried data is customized and modified as needed. After reconstructing the scenario network data, each network packet is fed back to the controller under test through the DDS service simulation entity to achieve scenario reproduction.
[0120] Taking the re-injection test of dynamic driving scene data as an example, this example is mainly used to simulate the real car driving scene on the test bench and test related functions, specifically:
[0121] S1: Start the vehicle on the road, enter the shell of the controller under test, use the tcpdump command to start collecting network messages passing through all network cards, enter the expressway, turn on the navigation ADAS function, collect Ethernet messages, and generate a pcap (a datagram storage format) file.
[0122] S2: The DDS data parsing tool reads the pcap file, parses each message, and obtains the topicName, serialized data, message timestamp, source address information, and destination address information carried by the DDS message frame;
[0123] S3: Search the serialized data for a characteristic hash value that matches the upper-layer business service interface and mark the business service corresponding to the message frame.
[0124] S4: Perform one of the following operations on the data frame in the above step: delete the message frame of a specific time; insert a custom message frame at a specific time; delete the message frame of a specific service interface; rewrite and replace the serialized data of a specific message frame.
[0125] S5: Start the DDS service entity simulation tool, register and initialize the peer service, and establish a connection with the device under test.
[0126] S6: The DDS service entity simulation tool reads the scene data file, reads the scene data messages in sequence according to the target address information and the message frame timestamp, and generates a sending task for the corresponding service.
[0127] S7: Send the above scene information in sequence to achieve the effect of scene reconstruction and re-injection.
[0128] like Figure 5 As shown, the present invention also provides a simulation test device for scene construction, the device comprising:
[0129] An acquisition unit 51 is used to acquire a network data packet file of a single scene of a vehicle under a DDS data distribution service protocol;
[0130] The processing unit 52 is used to process the network data packet file of a single scene to generate a scene data message of the single scene;
[0131] The testing unit 53 is used to input the scenario data message into the DDS service entity simulation tool to test the service function in the single scenario.
[0132] This embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0133] Figure 6A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 6 The electronic device 1600 shown includes: at least one processor 1601, a memory 1602, at least one network interface 1604 and other user interfaces 1603. The various components in the electronic device 1600 are coupled together via a bus system 1605. It is understood that the bus system 1605 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 1605 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 1605 is not described in detail. Figure 6 Various buses are labeled as bus system 1605.
[0134] The user interface 1603 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touch pad, or a touch screen).
[0135] It can be understood that the memory 1602 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The memory 1602 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0136] In some embodiments, the memory 1602 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 16021 and an application program 16022 .
[0137] The operating system 16021 includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application 16022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., which are used to implement various application services. The program for implementing the method of the embodiment of the present application can be included in the application 16022.
[0138] In this embodiment, by calling the program or instructions stored in the memory 1602, specifically, the program or instructions stored in the application 16022, the processor 1601 is used to execute the method steps provided by each method embodiment.
[0139] The method disclosed in the above embodiment of the present application can be applied to the processor 1601, or implemented by the processor 1601. The processor 1601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1601. The above processor 1601 can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software units in the decoding processor can be executed. The software unit can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 1602, and the processor 1601 reads the information in the memory 1602 and completes the steps of the above method in combination with its hardware.
[0140] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPDevice, DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the above functions of the present application, or a combination thereof.
[0141] For software implementation, the technology described above in this article can be implemented by a unit that performs the functions described above in this article. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0142] The electronic device provided in this embodiment may be Figure 6 The electronic device shown in can execute all the steps of the method described above, thereby achieving the technical effects described above. Please refer to the above related description for details. For the sake of brevity, it will not be repeated here.
[0143] The present invention also provides a vehicle, comprising:
[0144] Memory for storing computer programs;
[0145] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the above method is implemented.
[0146] The embodiment of the present application also provides a storage medium (computer-readable storage medium). The storage medium here stores one or more programs. The storage medium may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a read-only memory, a flash memory, a hard disk or a solid-state drive; the memory may also include a combination of the above-mentioned types of memory.
[0147] When one or more programs in the storage medium can be executed by one or more processors, the above method can be implemented.
[0148] The processor is used to execute the program stored in the memory to implement the above steps:
[0149] The professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0150] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0151] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0152] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.
Claims
1. A simulation test method for scene construction, characterized in that: The method comprises: Obtain the network data packet file of a single scenario of the vehicle under the DDS data distribution service agreement; Processing the network data packet file of a single scene to generate a scene data message of the single scene; The scenario data message is input into the DDS service entity simulation tool to test the service function in the single scenario.
2. The method according to claim 1, characterized in that The processing of the network data packet file of a single scene to generate the scene data message of the single scene is specifically as follows: According to the data format of the DDS protocol, the network data packet file of a single scene is parsed to generate a scene data message of the single scene.
3. The method according to claim 1, characterized in that: The step of inputting the scenario data message into the DDS service entity simulation tool to test the service function in the single scenario is as follows: According to the predetermined test requirements, the scenario data message of the single scenario is modified to generate the modified scenario data message; The modified scenario data message is input into the DDS service entity simulation tool to test the service function under the single scenario.
4. The method according to claim 3, characterized in that The scene data message includes at least one DDS message frame; the DDS message frame includes topicName, serialized data, message timestamp, source address information, and target address information; The topicName indicates: the topic name corresponding to the business in the current scenario; The serialized data representation represents: data on the business status of the business in the current scenario; The message timestamp indicates: the sending or receiving time of the DDS message frame; The source address information indicates: the sending address of the DDS message frame; The target address information indicates: the receiving address of the DDS message frame.
5. The method according to claim 4, characterized in that The scenario data message of the single scenario is modified according to the predetermined test requirements to generate the modified scenario data message as follows: Deleting a message frame whose message timestamp is a predetermined time from the scene data message; or Inserting a custom message frame into the scene data message; or In the scene data message, deleting the message frame of the predetermined service interface; or Modify the serialized data of the predetermined message frame in the scene data message.
6. The method according to claim 5, characterized in that The deleting the message frame whose message timestamp is the predetermined time from the scene data message specifically comprises: selecting the predetermined time that affects the service to be tested, and deleting the message frame corresponding to the predetermined time from the scene data message; The inserting of the custom message frame into the scene data message specifically comprises: generating a custom message frame according to the test requirements; inserting the custom message frame into the scene data message; In the scenario data message, the message frame for deleting the predetermined service interface is specifically: Select a predetermined service that affects the service to be tested, and delete a message frame of the predetermined service interface from the scenario data message; or The modifying of the serialized data of the predetermined message frame in the scenario data message specifically includes: selecting a service state that affects the service to be tested, and modifying the service state function in the serialized data of the predetermined message frame in the scenario data message.
7. The method according to claim 1, characterized in that The step of inputting the scenario data message into the DDS service entity simulation tool to test the service function in the single scenario is as follows: Input the scenario data message of a single scenario into the DDS service entity simulation tool; The DDS service entity simulation tool reads the DDS message frames in sequence according to the message timestamps of the DDS message frames of the scene data messages; The DDS service entity simulation tool selects the controller under test based on the target address information of the DDS message frame; The DDS service entity simulation tool parses the serialized data of the DDS message frame, generates a sending task of the service corresponding to the serialized data, and establishes a communication link with the screened controller under test; The DDS service entity simulation tool determines the refill rate according to the message timestamp of the DDS message frame of the scene data message, and sends the scene data message to the controller under test.
8. The method according to claim 1, characterized in that The network data packet file for obtaining a single scenario of a vehicle under the DDS service agreement is specifically: In a single vehicle scenario, network transmission messages between controllers under the DDS service protocol are collected to generate network data packet files.
9. The method according to claim 4, characterized in that The method further comprises: Search from the serialized data carried in the DDS message frame message to match the hash value feature of the predetermined upper-layer business service interface; According to the correspondence between the preset hash value feature and the upper-layer business service interface, obtain the label of the business corresponding to the matching hash value feature; A scene description file is generated according to the tag and the DDS message frame message, and outputted.
10. A simulation test device for scene construction, characterized in that: The device comprises: An acquisition unit, used for acquiring a network data packet file of a single scene of a vehicle under a DDS data distribution service agreement; A processing unit, used for processing the network data packet file of a single scene to generate a scene data message of the single scene; The testing unit is used to input the scenario data message into the DDS service entity simulation tool to test the service function in the single scenario.
11. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 9.
12. A vehicle, characterized in that: include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 9.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Simulation test method and device based on DDS, storage medium and electronic device
CN119854191A
